From 284837daa07b29d6a63a748544a90b1f5842ac5c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 10 Sep 2012 19:10:20 +0200 Subject: Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073) New snapshot --- .../Notifications/WebNotificationManager.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp') diff --git a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp b/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp index 2d667ef5e..2823da7b4 100644 --- a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp +++ b/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp @@ -105,6 +105,24 @@ NotificationClient::Permission WebNotificationManager::policyForOrigin(WebCore:: return NotificationClient::PermissionNotAllowed; } +void WebNotificationManager::removeAllPermissionsForTesting() +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + m_permissionsMap.clear(); +#endif +} + +uint64_t WebNotificationManager::notificationIDForTesting(Notification* notification) +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + if (!notification) + return 0; + return m_notificationMap.get(notification); +#else + return 0; +#endif +} + bool WebNotificationManager::show(Notification* notification, WebPage* page) { #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) -- cgit v1.2.1