summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-06-20 00:14:45 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-06-20 00:14:45 +0300
commit16437e771b0cd420e46d723117bb3b9c8cdd618b (patch)
treeb6d2506d9b19ba33650adaaef754d0a16f7b4822 /indra/media_plugins
parentea045c4fdfeeeaca30813b5f17ba61e249eda5b5 (diff)
parent295dd81fa36571585b5215c9da6709d7c350c51f (diff)
Merged in DRTVWR-492
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 559cfc0b7a..264289abac 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -62,6 +62,7 @@ private:
void onConsoleMessageCallback(std::string message, std::string source, int line);
void onStatusMessageCallback(std::string value);
void onTitleChangeCallback(std::string title);
+ void onTooltipCallback(std::string text);
void onLoadStartCallback();
void onRequestExitCallback();
void onLoadEndCallback(int httpStatusCode);
@@ -95,7 +96,6 @@ private:
bool mCanCopy;
bool mCanPaste;
std::string mCachePath;
- std::string mCookiePath;
std::string mCefLogFile;
bool mCefLogVerbose;
std::vector<std::string> mPickedFiles;
@@ -127,7 +127,6 @@ MediaPluginBase(host_send_func, host_user_data)
mCanCopy = false;
mCanPaste = false;
mCachePath = "";
- mCookiePath = "";
mCefLogFile = "";
mCefLogVerbose = false;
mPickedFiles.clear();
@@ -208,6 +207,12 @@ void MediaPluginCEF::onTitleChangeCallback(std::string title)
sendMessage(message);
}
+void MediaPluginCEF::onTooltipCallback(std::string text)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "tooltip_text");
+ message.setValue("tooltip", text);
+ sendMessage(message);
+}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginCEF::onLoadStartCallback()
@@ -486,6 +491,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
mCEFLib->setOnConsoleMessageCallback(std::bind(&MediaPluginCEF::onConsoleMessageCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
mCEFLib->setOnStatusMessageCallback(std::bind(&MediaPluginCEF::onStatusMessageCallback, this, std::placeholders::_1));
mCEFLib->setOnTitleChangeCallback(std::bind(&MediaPluginCEF::onTitleChangeCallback, this, std::placeholders::_1));
+ mCEFLib->setOnTooltipCallback(std::bind(&MediaPluginCEF::onTooltipCallback, this, std::placeholders::_1));
mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this));
mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1));
mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2));
@@ -501,7 +507,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
settings.background_color = 0xff282828;
settings.cache_enabled = true;
settings.cache_path = mCachePath;
- settings.cookie_store_path = mCookiePath;
settings.cookies_enabled = mCookiesEnabled;
settings.disable_gpu = mDisableGPU;
settings.flash_enabled = mPluginsEnabled;
@@ -556,7 +561,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
std::string user_data_path_cookies = message_in.getValue("cookies_path");
mCachePath = user_data_path_cache + "cef_cache";
- mCookiePath = user_data_path_cookies + "cef_cookies";
mCefLogFile = message_in.getValue("cef_log_file");
mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log");
}
@@ -657,10 +661,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
S32 x = message_in.getValueS32("x");
S32 y = message_in.getValueS32("y");
+ S32 delta_x = message_in.getValueS32("clicks_x");
+ S32 delta_y = message_in.getValueS32("clicks_y");
const int scaling_factor = 40;
- y *= -scaling_factor;
+ delta_x *= -scaling_factor;
+ delta_y *= -scaling_factor;
- mCEFLib->mouseWheel(x, y);
+ mCEFLib->mouseWheel(x, y, delta_x, delta_y);
}
else if (message_name == "text_event")
{