diff options
author | Callum Prentice <callum@lindenlab.com> | 2021-08-20 08:28:48 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2021-08-20 08:28:48 -0700 |
commit | 0c89e67eb5bf2d82596d0c697831787cbbdf1e7f (patch) | |
tree | 070cc3da58f67f9935f66dbadae3c283af0ac401 /indra/llplugin | |
parent | c40b8310b00f1d620a2f5a94f2514c8bf3531373 (diff) |
DRTVWR-534: Batch of modifications to 360 capture project after moving from internal repo to public one.
Diffstat (limited to 'indra/llplugin')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 22 | ||||
-rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 6d51adc685..da352e8dd4 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -714,6 +714,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"; @@ -891,6 +900,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 382f891e0c..69622c62db 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -139,6 +139,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; }; @@ -199,6 +201,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); /////////////////////////////////// |