summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-12-17 09:27:19 -0600
committerRunitai Linden <davep@lindenlab.com>2021-12-17 09:27:19 -0600
commit92933b42522b37ad78fd714e8416681183d7d7f9 (patch)
tree3a859deda6047d28df3e2bd04c4299ca21c81495 /indra/llplugin
parentdd032467357a4aaf69c752c13e53122aff6c4755 (diff)
parent3ac21ebbf6b354e16ead2d095a61152c95a7243c (diff)
Merge branch 'DRTVWR-546' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-546
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp22
-rw-r--r--indra/llplugin/llpluginclassmedia.h4
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp1
3 files changed, 27 insertions, 0 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index a436452461..6f88232c1d 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"