[Qt] Remove synchronous QWebPage::checkPermissions signal
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Nov 2010 16:28:14 +0000 (16:28 +0000)
committerSimon Hausmann <simon.hausmann@nokia.com>
Tue, 23 Nov 2010 14:54:11 +0000 (15:54 +0100)
commite645d4334fed324741f44b8af77f0e3dab8da2de
tree6de345b599e4b287035cf9bff3bc9d15f91358c3
parente60aee807ad6552349588335452538daec966a3e
[Qt] Remove synchronous QWebPage::checkPermissions signal
https://bugs.webkit.org/show_bug.cgi?id=46810

Reviewed by Andreas Kling.

WebKit/qt:

As decided in the API review, we remove this signal and replace its only use currently
with cached credentials.

* Api/qwebpage.cpp:
(QWebPage::setUserPermission): Pass the WebCore frame instead of the QWebFrame.
* Api/qwebpage.h:
* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationPresenterClientQt::checkPermission): Replaced explicit
signal emission with hash lookup of previously granted permission (or not).
(WebCore::NotificationPresenterClientQt::cancelRequestsForPermission): Remove
any previously cached/granted permission for the given script execution context.
(WebCore::NotificationPresenterClientQt::allowNotificationForFrame): Do not
only serve pending permission requests but before calling the JS callbacks, remember
the permission for subsequent synchronous checkPermission() calls.
* WebCoreSupport/NotificationPresenterClientQt.h: Add cache for permissions.

WebKitTools:

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::WebPage):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::grantDesktopNotificationPermission): When granting
permission, grant it directly on the QWebPage/Frame, that will remember it.
* QtTestBrowser/webpage.cpp:
(WebPage::WebPage):
* QtTestBrowser/webpage.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/qt/Api/qwebpage.cpp
WebKit/qt/Api/qwebpage.h
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
WebKitTools/QtTestBrowser/webpage.cpp
WebKitTools/QtTestBrowser/webpage.h