diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
commit | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch) | |
tree | 52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp | |
parent | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff) | |
download | qtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz |
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp index e74ad07b7..0c0850bee 100644 --- a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp +++ b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp @@ -77,12 +77,12 @@ void WebNotificationManagerProxy::didReceiveMessage(CoreIPC::Connection* connect didReceiveWebNotificationManagerProxyMessage(connection, messageID, arguments); } -void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& originString, uint64_t notificationID) +void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& iconURL, const String& originString, uint64_t notificationID) { if (!isNotificationIDValid(notificationID)) return; - RefPtr<WebNotification> notification = WebNotification::create(title, body, originString, notificationID); + RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, originString, notificationID); m_notifications.set(notificationID, notification); m_provider.show(page, notification.get()); } @@ -111,6 +111,14 @@ void WebNotificationManagerProxy::didDestroyNotification(uint64_t notificationID m_provider.didDestroyNotification(notification.get()); } +void WebNotificationManagerProxy::clearNotifications(const Vector<uint64_t>& notificationIDs) +{ + m_provider.clearNotifications(notificationIDs); + size_t count = notificationIDs.size(); + for (size_t i = 0; i < count; ++i) + m_notifications.remove(notificationIDs[i]); +} + void WebNotificationManagerProxy::providerDidShowNotification(uint64_t notificationID) { if (!m_context) |