summaryrefslogtreecommitdiff
path: root/indra/media_plugins/webkit/media_plugin_webkit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp')
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp33
1 files changed, 21 insertions, 12 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 5260636e11..47766a24cb 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -50,9 +50,7 @@
# define LL_QTWEBKIT_USES_PIXMAPS 0
#endif // LL_LINUX
-#if LL_LINUX
-# include "linux_volume_catcher.h"
-#endif // LL_LINUX
+# include "volume_catcher.h"
#if LL_WINDOWS
# include <direct.h>
@@ -119,9 +117,7 @@ private:
F32 mBackgroundG;
F32 mBackgroundB;
-#if LL_LINUX
- LinuxVolumeCatcher mLinuxVolumeCatcher;
-#endif // LL_LINUX
+ VolumeCatcher mVolumeCatcher;
void setInitState(int state)
{
@@ -135,9 +131,7 @@ private:
{
LLQtWebKit::getInstance()->pump( milliseconds );
-#if LL_LINUX
- mLinuxVolumeCatcher.pump();
-#endif // LL_LINUX
+ mVolumeCatcher.pump();
checkEditState();
@@ -508,6 +502,19 @@ private:
sendMessage(message);
}
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onCookieChanged(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "cookie_set");
+ message.setValue("cookie", event.getStringValue());
+ // These could be passed through as well, but aren't really needed.
+// message.setValue("uri", event.getEventUri());
+// message.setValueBoolean("dead", (event.getIntValue() != 0))
+ sendMessage(message);
+ }
+
LLQtWebKit::EKeyboardModifier decodeModifiers(std::string &modifiers)
{
int result = 0;
@@ -1053,6 +1060,10 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
mJavascriptEnabled = message_in.getValueBoolean("enable");
//LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
}
+ else if(message_name == "set_cookies")
+ {
+ LLQtWebKit::getInstance()->setCookies(message_in.getValue("cookies"));
+ }
else if(message_name == "proxy_setup")
{
bool val = message_in.getValueBoolean("enable");
@@ -1122,9 +1133,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
void MediaPluginWebKit::setVolume(F32 volume)
{
-#if LL_LINUX
- mLinuxVolumeCatcher.setVolume(volume);
-#endif // LL_LINUX
+ mVolumeCatcher.setVolume(volume);
}
int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data)