From 5af96e2c7b73ebc627c6894727826a7576d31758 Mon Sep 17 00:00:00 2001 From: Leon Clarke Date: Thu, 3 Jun 2010 14:33:32 +0100 Subject: Merge webkit.org at r60469 : Initial merge by git. Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234 --- WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h') diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h index 6045463..0d348cf 100644 --- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h +++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -30,6 +30,18 @@ class QWebElement; class QWebFrame; class QWebPage; +enum NotificationPermission { + NotificationAllowed, + NotificationNotAllowed, + NotificationDenied +}; + +typedef void (CheckPermissionFunctionType) (QObject* receiver, const QUrl&, NotificationPermission&); +typedef void (RequestPermissionFunctionType) (QObject* receiver, QWebPage* page, const QString&); + +extern CheckPermissionFunctionType* checkPermissionFunction; +extern RequestPermissionFunctionType* requestPermissionFunction; + class QWEBKIT_EXPORT DumpRenderTreeSupportQt { public: @@ -78,8 +90,10 @@ public: static int pageNumberForElementById(QWebFrame* frame, const QString& id, float width, float height); static bool hasDocumentElement(QWebFrame* frame); static bool elementDoesAutoCompleteForElementWithId(QWebFrame* frame, const QString& elementId); + static void setEditingBehavior(QWebPage* page, const QString& editingBehavior); static void whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains); + static void removeWhiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains); static void resetOriginAccessWhiteLists(); static int workerThreadCount(); @@ -98,7 +112,12 @@ public: static void dumpSetAcceptsEditing(bool b); static void dumpNotification(bool b); - + // These functions should eventually turn into public API + // and the "receiver" concept would go away + static void setNotificationsReceiver(QWebPage* page, QObject* receiver); + static void allowNotificationForOrigin(QWebPage* page, const QString& origin); + static void setCheckPermissionFunction(CheckPermissionFunctionType*); + static void setRequestPermissionFunction(RequestPermissionFunctionType*); }; #endif -- cgit v1.1