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

Side by Side Diff: Source/modules/serviceworkers/WaitUntilObserver.cpp

Issue 720873002: Expose the notificationclick and notificationerror events on ServiceWorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments and test Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/WaitUntilObserver.h" 6 #include "modules/serviceworkers/WaitUntilObserver.h"
7 7
8 #include "bindings/core/v8/ScriptFunction.h" 8 #include "bindings/core/v8/ScriptFunction.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 ServiceWorkerGlobalScopeClient* client = ServiceWorkerGlobalScopeClient::fro m(executionContext()); 118 ServiceWorkerGlobalScopeClient* client = ServiceWorkerGlobalScopeClient::fro m(executionContext());
119 WebServiceWorkerEventResult result = m_hasError ? WebServiceWorkerEventResul tRejected : WebServiceWorkerEventResultCompleted; 119 WebServiceWorkerEventResult result = m_hasError ? WebServiceWorkerEventResul tRejected : WebServiceWorkerEventResultCompleted;
120 switch (m_type) { 120 switch (m_type) {
121 case Activate: 121 case Activate:
122 client->didHandleActivateEvent(m_eventID, result); 122 client->didHandleActivateEvent(m_eventID, result);
123 break; 123 break;
124 case Install: 124 case Install:
125 client->didHandleInstallEvent(m_eventID, result); 125 client->didHandleInstallEvent(m_eventID, result);
126 break; 126 break;
127 case NotificationClick:
128 client->didHandleNotificationClickEvent(m_eventID, result);
129 break;
130 case NotificationError:
131 client->didHandleNotificationErrorEvent(m_eventID, result);
132 break;
127 } 133 }
128 observeContext(0); 134 observeContext(0);
129 } 135 }
130 136
131 } // namespace blink 137 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/WaitUntilObserver.h ('k') | Source/web/ServiceWorkerGlobalScopeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698