[Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy
authorjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2011 13:37:20 +0000 (13:37 +0000)
committerjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2011 13:37:20 +0000 (13:37 +0000)
commit939af5d649e55711b71f8794c161157a696919d3
tree5123ad02fef479d092d0bea8b6d96892acc7e36f
parent6c8b9b10147acafd145ae0f73607e064a2134c2f
[Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy
https://bugs.webkit.org/show_bug.cgi?id=66668

Reviewed by Simon Hausmann.

Split QtPageClient out of QtWebPageProxy.
This client will live in QQuickWebViewPrivate and communicate directly
with QtWebPageProxy and QtWebPageEventHandler. The functions that need
anything else than these entities will need to call the proper implementation
through QtWebPageProxy itself.
With this we have a clear separation between PageClient and PageProxy, having
two well defined and separated entities for hooking our clients with our API layer (QtWebPageProxy)
and for hooking the WebPageProxy with our client implementations (QtPageClient).
As a positive side-effect we have a cleaner QtWebPageProxy.

* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp: Added.
(QtPageClient::QtPageClient):
(QtPageClient::~QtPageClient):
(QtPageClient::createDrawingAreaProxy):
(QtPageClient::setViewNeedsDisplay):
(QtPageClient::pageDidRequestScroll):
(QtPageClient::processDidCrash):
(QtPageClient::didRelaunchProcess):
(QtPageClient::didChangeContentsSize):
(QtPageClient::didChangeViewportProperties):
(QtPageClient::startDrag):
(QtPageClient::handleDownloadRequest):
(QtPageClient::setCursor):
(QtPageClient::setCursorHiddenUntilMouseMoves):
(QtPageClient::toolTipChanged):
(QtPageClient::registerEditCommand):
(QtPageClient::clearAllEditCommands):
(QtPageClient::canUndoRedo):
(QtPageClient::executeUndoRedo):
(QtPageClient::convertToDeviceSpace):
(QtPageClient::convertToUserSpace):
(QtPageClient::screenToWindow):
(QtPageClient::windowToScreen):
(QtPageClient::createPopupMenuProxy):
(QtPageClient::createContextMenuProxy):
(QtPageClient::flashBackingStoreUpdates):
(QtPageClient::didFindZoomableArea):
(QtPageClient::didReceiveMessageFromNavigatorQtObject):
(QtPageClient::doneWithTouchEvent):
(QtPageClient::displayView):
(QtPageClient::scrollView):
(QtPageClient::viewSize):
(QtPageClient::isViewWindowActive):
(QtPageClient::isViewFocused):
(QtPageClient::isViewVisible):
(QtPageClient::isViewInWindow):
(QtPageClient::enterAcceleratedCompositingMode):
(QtPageClient::exitAcceleratedCompositingMode):
* UIProcess/qt/QtPageClient.h: Added.
(QtPageClient::pageClosed):
(QtPageClient::doneWithKeyEvent):
(QtPageClient::setFindIndicator):
(QtPageClient::didCommitLoadForMainFrame):
(QtPageClient::didFinishLoadingDataForCustomRepresentation):
(QtPageClient::customRepresentationZoomFactor):
(QtPageClient::setCustomRepresentationZoomFactor):
(QtPageClient::didChangeScrollbarsForMainFrame):
(QtPageClient::findStringInCustomRepresentation):
(QtPageClient::countStringMatchesInCustomRepresentation):
(QtPageClient::setEventHandler):
(QtPageClient::setPageProxy):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
* UIProcess/qt/QtWebPageProxy.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
Source/WebKit2/UIProcess/qt/QtPageClient.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/qt/QtPageClient.h [new file with mode: 0644]
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h