summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-11-23 15:11:48 -0800
committerRider Linden <rider@lindenlab.com>2015-11-23 15:11:48 -0800
commit80558b76929d06235083a059867cef7eba45c60b (patch)
tree3b8dcf133c24310544f2f7ab5ee19a86708824a5 /indra
parentd61e1ce11ab35b54141eff355e1477ff8172aa41 (diff)
parentcc0faa34243047303c5cc066525e93c49bc5920d (diff)
Merged callum_linden/viewer-cef into default
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp21
2 files changed, 10 insertions, 15 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 23c5cd8794..4965d7ce08 100755
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -845,14 +845,14 @@ void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
void LLPluginClassMedia::setPluginsEnabled(const bool enabled)
{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "plugins_enabled");
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "plugins_enabled");
message.setValueBoolean("enable", enabled);
sendMessage(message);
}
void LLPluginClassMedia::setJavascriptEnabled(const bool enabled)
{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "javascript_enabled");
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "javascript_enabled");
message.setValueBoolean("enable", enabled);
sendMessage(message);
}
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index ec3518100b..77e6d35b11 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -338,7 +338,7 @@ void MediaPluginCEF::authResponse(LLPluginMessage &message)
//
void MediaPluginCEF::receiveMessage(const char* message_string)
{
- // std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
+ // std::cerr << "MediaPluginCEF::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
LLPluginMessage message_in;
if (message_in.parse(message_string) >= 0)
@@ -356,7 +356,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
message.setValueLLSD("versions", versions);
- std::string plugin_version = "CEF plugin 1.0.0";
+ std::string plugin_version = "CEF plugin 1.1.3";
message.setValue("plugin_version", plugin_version);
sendMessage(message);
}
@@ -400,7 +400,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else
{
- //std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
}
LLPluginMessage message("base", "shm_remove_response");
@@ -409,7 +408,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else
{
- //std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
}
}
else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
@@ -440,7 +438,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
settings.cache_enabled = true;
settings.cache_path = mCachePath;
settings.accept_language_list = mHostLanguage;
- settings.user_agent_substring = mUserAgentSubtring;
+ settings.user_agent_substring = mLLCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring);
bool result = mLLCEFLib->init(settings);
if (!result)
@@ -528,15 +526,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
S32 x = message_in.getValueS32("x");
S32 y = message_in.getValueS32("y");
- //std::string modifiers = message_in.getValue("modifiers");
-
+ // only even send left mouse button events to LLCEFLib
+ // (partially prompted by crash in OS X CEF when sending right button events)
+ // we catch the right click in viewer and display our own context menu anyway
S32 button = message_in.getValueS32("button");
LLCEFLib::EMouseButton btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT;
- if (button == 0) btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT;
- if (button == 1) btn = LLCEFLib::MB_MOUSE_BUTTON_RIGHT;
- if (button == 2) btn = LLCEFLib::MB_MOUSE_BUTTON_MIDDLE;
- if (event == "down")
+ if (event == "down" && button == 0)
{
mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOWN, x, y);
mLLCEFLib->setFocus(true);
@@ -545,7 +541,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
str << "Mouse down at = " << x << ", " << y;
postDebugMessage(str.str());
}
- else if (event == "up")
+ else if (event == "up" && button == 0)
{
mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_UP, x, y);
@@ -709,7 +705,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else
{
- //std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl;
};
}
}