diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-12-20 15:35:59 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-12-20 15:36:23 +0200 |
commit | d91606b354e1b8dc570a6dd42c4c8d0b3566088f (patch) | |
tree | 63d2efe2731af4478ca81e89ddd5839a998e9622 /indra/llplugin | |
parent | 2112abac1bed6155aa8e2b1dcb768db009639d74 (diff) | |
parent | 0a873cd95547f003878c6d00d0883ff792f4a865 (diff) |
Merge branch 'master' into DRTVWR-544-maint
Diffstat (limited to 'indra/llplugin')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 22 | ||||
-rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 4 | ||||
-rw-r--r-- | indra/llplugin/llpluginprocessparent.cpp | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 1d6a622d61..3e72710366 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -774,6 +774,15 @@ void LLPluginClassMedia::loadURI(const std::string &uri) sendMessage(message); } +void LLPluginClassMedia::executeJavaScript(const std::string &code) +{ + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "execute_javascript"); + + message.setValue("code", code); + + sendMessage(message); +} + const char* LLPluginClassMedia::priorityToString(EPriority priority) { const char* result = "UNKNOWN"; @@ -951,6 +960,19 @@ void LLPluginClassMedia::setJavascriptEnabled(const bool enabled) sendMessage(message); } +void LLPluginClassMedia::setWebSecurityDisabled(const bool disabled) +{ + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "web_security_disabled"); + message.setValueBoolean("disabled", disabled); + sendMessage(message); +} + +void LLPluginClassMedia::setFileAccessFromFileUrlsEnabled(const bool enabled) +{ + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "file_access_from_file_urls"); + message.setValueBoolean("enabled", enabled); + sendMessage(message); +} void LLPluginClassMedia::enableMediaPluginDebugging( bool enable ) { diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index a09145cf50..adbb93f789 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -153,6 +153,8 @@ public: void loadURI(const std::string &uri); + void executeJavaScript(const std::string &code); + // "Loading" means uninitialized or any state prior to fully running (processing commands) bool isPluginLoading(void) { return mPlugin?mPlugin->isLoading():false; }; @@ -213,6 +215,8 @@ public: void setLanguageCode(const std::string &language_code); void setPluginsEnabled(const bool enabled); void setJavascriptEnabled(const bool enabled); + void setWebSecurityDisabled(const bool disabled); + void setFileAccessFromFileUrlsEnabled(const bool enabled); void setTarget(const std::string &target); /////////////////////////////////// diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index e5b4dec1bd..e50db69190 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -28,6 +28,7 @@ #include "linden_common.h" +#include "llapp.h" #include "llpluginprocessparent.h" #include "llpluginmessagepipe.h" #include "llpluginmessageclasses.h" |