summaryrefslogtreecommitdiff
path: root/indra/media_plugins/webkit
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-09-22 16:25:47 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-09-22 16:25:47 -0700
commit5626cc0ccfabfaec74aee5d7bdf6b92d76d9951f (patch)
tree5024dec6f790e4916ab9ae3ffc1ea2cefeaf38e2 /indra/media_plugins/webkit
parent0edb695ea86d7997ae3952e155ed5b4922c799f8 (diff)
Temporary changes to allow the viewer to build against an older version of llqtwebkit.
NOTE: once updated builds of llqtwebkit are available on all platforms, this changeset should be backed out.
Diffstat (limited to 'indra/media_plugins/webkit')
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index bd1a44a930..c47052bae9 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -304,7 +304,11 @@ private:
LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
// create single browser window
+#if LLQTWEBKIT_API_VERSION < 2
+ mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight);
+#else
mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight, mTarget);
+#endif
// tell LLQtWebKit about the size of the browser window
LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
@@ -505,9 +509,14 @@ private:
void onClickLinkHref(const EventType& event)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_href");
+#if LLQTWEBKIT_API_VERSION < 2
+ message.setValue("uri", event.getStringValue());
+ message.setValue("target", event.getStringValue2());
+#else
message.setValue("uri", event.getEventUri());
message.setValue("target", event.getStringValue());
message.setValue("uuid", event.getStringValue2());
+#endif
sendMessage(message);
}
@@ -516,7 +525,11 @@ private:
void onClickLinkNoFollow(const EventType& event)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_nofollow");
+#if LLQTWEBKIT_API_VERSION < 2
+ message.setValue("uri", event.getStringValue());
+#else
message.setValue("uri", event.getEventUri());
+#endif
sendMessage(message);
}
@@ -538,7 +551,9 @@ private:
void onWindowCloseRequested(const EventType& event)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "close_request");
+#if LLQTWEBKIT_API_VERSION >= 2
message.setValue("uuid", event.getStringValue());
+#endif
sendMessage(message);
}
@@ -1199,6 +1214,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
}
}
}
+#if LLQTWEBKIT_API_VERSION >= 2
else if(message_name == "proxy_window_opened")
{
std::string target = message_in.getValue("target");
@@ -1210,6 +1226,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
std::string uuid = message_in.getValue("uuid");
LLQtWebKit::getInstance()->proxyWindowClosed(mBrowserWindowId, uuid);
}
+#endif
else
{
// std::cerr << "MediaPluginWebKit::receiveMessage: unknown media_browser message: " << message_string << std::endl;