Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1488)

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1078783002: Update the Notification Blink API to use integral persistent ids. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index 3b6af820d0060bb96d13e2d323c7473e0302c103..fb6044a0ddf2b5a8f8fd18548974489f6ab04c8a 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -131,6 +131,16 @@ void ServiceWorkerGlobalScopeProxy::dispatchMessageEvent(const WebString& messag
m_workerGlobalScope->dispatchEvent(MessageEvent::create(ports.release(), value));
}
+void ServiceWorkerGlobalScopeProxy::dispatchNotificationClickEvent(int eventID, int64_t notificationID, const WebNotificationData& data)
+{
+ ASSERT(m_workerGlobalScope);
+ WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope, WaitUntilObserver::NotificationClick, eventID);
+ NotificationEventInit eventInit;
+ eventInit.setNotification(Notification::create(m_workerGlobalScope, notificationID, data));
+ RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationclick, eventInit, observer));
+ m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
+}
+
void ServiceWorkerGlobalScopeProxy::dispatchNotificationClickEvent(int eventID, const WebString& notificationID, const WebNotificationData& data)
{
ASSERT(m_workerGlobalScope);
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | public/platform/modules/notifications/WebNotificationManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698