[Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy
[WebKit.git] / Source / WebKit2 / UIProcess / API / qt / qquickwebview.cpp
index 76ea29e..3a0f9de 100644 (file)
@@ -50,8 +50,10 @@ QQuickWebViewPrivate::QQuickWebViewPrivate(QQuickWebView* viewport, WKContextRef
     QObject::connect(viewport, SIGNAL(visibleChanged()), viewport, SLOT(_q_onVisibleChanged()));
     pageView.reset(new QQuickWebPage(viewport));
 
+    pageClient.reset(new QtPageClient());
+
     QQuickWebPagePrivate* const pageViewPrivate = pageView.data()->d;
-    setPageProxy(new QtWebPageProxy(pageView.data(), q_ptr, contextRef, pageGroupRef));
+    setPageProxy(new QtWebPageProxy(pageView.data(), q_ptr, pageClient.data(), contextRef, pageGroupRef));
     pageViewPrivate->setPageProxy(pageProxy.data());
 
     pageLoadClient.reset(new QtWebPageLoadClient(pageProxy->pageRef(), q_ptr));
@@ -63,6 +65,9 @@ QQuickWebViewPrivate::QQuickWebViewPrivate(QQuickWebView* viewport, WKContextRef
     setUseTraditionalDesktopBehaviour(false);
     QWebPreferencesPrivate::get(pageProxy->preferences())->setAttribute(QWebPreferencesPrivate::AcceleratedCompositingEnabled, true);
 
+    pageClient->setEventHandler(eventHandler.data());
+    pageClient->setPageProxy(pageProxy.data());
+
     // Creates a page with the page creation parameters.
     pageProxy->init(eventHandler.data());
 }