summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-22 15:40:17 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-22 15:40:17 +0200
commit43a42f108af6bcbd91f2672731c3047c26213af1 (patch)
tree7fa092e5f5d873c72f2486a70e26be26f7a38bec /Source/WebKit2/WebProcess/WebPage/WebPage.cpp
parentd9cf437c840c6eb7417bdd97e6c40979255d3158 (diff)
downloadqtwebkit-43a42f108af6bcbd91f2672731c3047c26213af1.tar.gz
Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067)
New snapshot that fixes build without QtWidgets
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index e82e65c06..1afe3e324 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -451,6 +451,7 @@ void WebPage::initializeInjectedBundleDiagnosticLoggingClient(WKBundlePageDiagno
m_logDiagnosticMessageClient.initialize(client);
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
PassRefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* pluginElement, const Plugin::Parameters& parameters)
{
String pluginPath;
@@ -488,13 +489,12 @@ PassRefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* plu
#if ENABLE(PLUGIN_PROCESS)
return PluginProxy::create(pluginPath);
-#elif ENABLE(NETSCAPE_PLUGIN_API)
+#else
NetscapePlugin::setSetExceptionFunction(NPRuntimeObjectMap::setGlobalException);
return NetscapePlugin::create(NetscapePluginModule::getOrCreate(pluginPath));
-#else
- return 0;
#endif
}
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
EditorState WebPage::editorState() const
{
@@ -1215,14 +1215,14 @@ void WebPage::setGapBetweenPages(double gap)
m_page->setPagination(pagination);
}
-void WebPage::postInjectedBundleMessage(const String& messageName, CoreIPC::ArgumentDecoder* argumentDecoder)
+void WebPage::postInjectedBundleMessage(const String& messageName, CoreIPC::MessageDecoder& decoder)
{
InjectedBundle* injectedBundle = WebProcess::shared().injectedBundle();
if (!injectedBundle)
return;
RefPtr<APIObject> messageBody;
- if (!argumentDecoder->decode(InjectedBundleUserMessageDecoder(messageBody)))
+ if (!decoder.decode(InjectedBundleUserMessageDecoder(messageBody)))
return;
injectedBundle->didReceiveMessageToPage(this, messageName, messageBody.get());
@@ -2763,18 +2763,18 @@ bool WebPage::windowAndWebPageAreFocused() const
return m_page->focusController()->isFocused() && m_page->focusController()->isActive();
}
-void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder)
{
if (messageID.is<CoreIPC::MessageClassDrawingArea>()) {
if (m_drawingArea)
- m_drawingArea->didReceiveDrawingAreaMessage(connection, messageID, arguments);
+ m_drawingArea->didReceiveDrawingAreaMessage(connection, messageID, decoder);
return;
}
#if USE(TILED_BACKING_STORE) && USE(ACCELERATED_COMPOSITING)
if (messageID.is<CoreIPC::MessageClassLayerTreeCoordinator>()) {
if (m_drawingArea)
- m_drawingArea->didReceiveLayerTreeCoordinatorMessage(connection, messageID, arguments);
+ m_drawingArea->didReceiveLayerTreeCoordinatorMessage(connection, messageID, decoder);
return;
}
#endif
@@ -2782,24 +2782,24 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
#if ENABLE(INSPECTOR)
if (messageID.is<CoreIPC::MessageClassWebInspector>()) {
if (WebInspector* inspector = this->inspector())
- inspector->didReceiveWebInspectorMessage(connection, messageID, arguments);
+ inspector->didReceiveWebInspectorMessage(connection, messageID, decoder);
return;
}
#endif
#if ENABLE(FULLSCREEN_API)
if (messageID.is<CoreIPC::MessageClassWebFullScreenManager>()) {
- fullScreenManager()->didReceiveMessage(connection, messageID, arguments);
+ fullScreenManager()->didReceiveMessage(connection, messageID, decoder);
return;
}
#endif
- didReceiveWebPageMessage(connection, messageID, arguments);
+ didReceiveWebPageMessage(connection, messageID, decoder);
}
-void WebPage::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply)
+void WebPage::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder)
{
- didReceiveSyncWebPageMessage(connection, messageID, arguments, reply);
+ didReceiveSyncWebPageMessage(connection, messageID, decoder, replyEncoder);
}
InjectedBundleBackForwardList* WebPage::backForwardList()
@@ -3446,6 +3446,7 @@ void WebPage::setScrollingPerformanceLoggingEnabled(bool enabled)
static bool canPluginHandleResponse(const ResourceResponse& response)
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
String pluginPath;
bool blocked;
@@ -3453,6 +3454,9 @@ static bool canPluginHandleResponse(const ResourceResponse& response)
return false;
return !blocked && !pluginPath.isEmpty();
+#else
+ return false;
+#endif
}
bool WebPage::shouldUseCustomRepresentationForResponse(const ResourceResponse& response) const