[Qt] [WK2] Move PagePolicyClient related code to QtWebPagePolicyClient
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Nov 2011 13:20:01 +0000 (13:20 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Nov 2011 13:20:01 +0000 (13:20 +0000)
commit4e2f2cddcbbf87c6fda13a143b55b9529aa52da3
treea2fe10016a2548a501b8fee2b89b06d85ddf2bd5
parent33af611800508947fa497e5751e18c1adbe7d852
[Qt] [WK2] Move PagePolicyClient related code to QtWebPagePolicyClient
https://bugs.webkit.org/show_bug.cgi?id=72959

Reviewed by Andreas Kling.

Split PagePolicyClient related code from QtWebPageProxy/ClientImpl. The new
QtWebPagePolicyClient registers itself with WKPageRef and it's owned by the
QQuickWebViewPrivate. This is a move to clean up QtWebPageProxy object.

QtPolicyInterface abstraction was not helping us as much as the separation of
the client code will. It was more useful when we had multiple WebViews.

* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(toPolicyAction):
(QQuickWebViewPrivate::navigationPolicyForURL):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/ClientImpl.cpp:
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPagePolicyClient.cpp: Added.
(QtWebPagePolicyClient::QtWebPagePolicyClient):
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
(toQtWebPagePolicyClient):
(toQtMouseButton):
(toQtKeyboardModifiers):
(QtWebPagePolicyClient::decidePolicyForResponse):
* UIProcess/qt/QtWebPagePolicyClient.h: Renamed from Source/WebKit2/UIProcess/qt/QtPolicyInterface.h.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::init):
* UIProcess/qt/QtWebPageProxy.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101071 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.h
Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
Source/WebKit2/UIProcess/qt/ClientImpl.cpp
Source/WebKit2/UIProcess/qt/ClientImpl.h
Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.h [moved from Source/WebKit2/UIProcess/qt/QtPolicyInterface.h with 55% similarity]
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h