summaryrefslogtreecommitdiff
path: root/indra/media_plugins/cef/media_plugin_cef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp')
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index a2b664c755..0d7da6bd58 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -118,6 +118,7 @@ private:
std::string mContextCachePath;
std::string mCefLogFile;
bool mCefLogVerbose;
+ U32 mCefRemoteDebuggingPort;
std::vector<std::string> mPickedFiles;
VolumeCatcher mVolumeCatcher;
F32 mCurVolume;
@@ -159,6 +160,7 @@ MediaPluginBase(host_send_func, host_user_data)
mCanSelectAll = false;
mCefLogFile = "";
mCefLogVerbose = false;
+ mCefRemoteDebuggingPort = 0;
mPickedFiles.clear();
mCurVolume = 0.0;
@@ -711,6 +713,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
settings.webgl_enabled = true;
settings.log_file = mCefLogFile;
settings.log_verbose = mCefLogVerbose;
+ settings.enable_remote_debug = (mCefRemoteDebuggingPort != 0);
+ settings.remote_debugging_port = mCefRemoteDebuggingPort;
settings.autoplay_without_gesture = true;
std::vector<std::string> custom_schemes(1, "secondlife");
@@ -775,6 +779,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
mCefLogFile = message_in.getValue("cef_log_file");
mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log");
+ mCefRemoteDebuggingPort = message_in.getValueU32("cef_remote_debugging_port");
}
else if (message_name == "size_change")
{
@@ -957,7 +962,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
authResponse(message_in);
}
-#if !LL_LINUX
if (message_name == "edit_undo")
{
mCEFLib->editUndo();
@@ -966,7 +970,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
mCEFLib->editRedo();
}
-#endif
if (message_name == "edit_cut")
{
mCEFLib->editCut();
@@ -979,7 +982,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
mCEFLib->editPaste();
}
-#if !LL_LINUX
if (message_name == "edit_delete")
{
mCEFLib->editDelete();
@@ -992,7 +994,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
mCEFLib->viewSource();
}
-#endif
}
else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
{
@@ -1176,28 +1177,19 @@ void MediaPluginCEF::unicodeInput(std::string event, LLSD native_key_data = LLSD
//
void MediaPluginCEF::checkEditState()
{
-#if !LL_LINUX
bool can_undo = mCEFLib->editCanUndo();
bool can_redo = mCEFLib->editCanRedo();
-#endif
bool can_cut = mCEFLib->editCanCut();
bool can_copy = mCEFLib->editCanCopy();
bool can_paste = mCEFLib->editCanPaste();
-#if !LL_LINUX
bool can_delete = mCEFLib->editCanDelete();
bool can_select_all = mCEFLib->editCanSelectAll();
-#endif
-#if LL_LINUX
- if ((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste))
-#else
if ((can_undo != mCanUndo) || (can_redo != mCanRedo) || (can_cut != mCanCut) || (can_copy != mCanCopy)
|| (can_paste != mCanPaste) || (can_delete != mCanDelete) || (can_select_all != mCanSelectAll))
-#endif
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_state");
-#if !LL_LINUX
if (can_undo != mCanUndo)
{
mCanUndo = can_undo;
@@ -1209,7 +1201,6 @@ void MediaPluginCEF::checkEditState()
mCanRedo = can_redo;
message.setValueBoolean("redo", can_redo);
}
-#endif
if (can_cut != mCanCut)
{
@@ -1229,7 +1220,6 @@ void MediaPluginCEF::checkEditState()
message.setValueBoolean("paste", can_paste);
}
-#if !LL_LINUX
if (can_delete != mCanDelete)
{
mCanDelete = can_delete;
@@ -1241,7 +1231,6 @@ void MediaPluginCEF::checkEditState()
mCanSelectAll = can_select_all;
message.setValueBoolean("select_all", can_select_all);
}
-#endif
sendMessage(message);
}