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

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

Issue 1148293011: BackgroundSync sync events need to be ExtendableEvents, blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unnecessary comment Created 5 years, 6 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 unified diff | Download patch
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 client->didHandleInstallEvent(m_eventID, result); 171 client->didHandleInstallEvent(m_eventID, result);
172 break; 172 break;
173 case NotificationClick: 173 case NotificationClick:
174 client->didHandleNotificationClickEvent(m_eventID, result); 174 client->didHandleNotificationClickEvent(m_eventID, result);
175 m_consumeWindowInteractionTimer.stop(); 175 m_consumeWindowInteractionTimer.stop();
176 consumeWindowInteraction(nullptr); 176 consumeWindowInteraction(nullptr);
177 break; 177 break;
178 case Push: 178 case Push:
179 client->didHandlePushEvent(m_eventID, result); 179 client->didHandlePushEvent(m_eventID, result);
180 break; 180 break;
181 case Sync:
182 client->didHandleSyncEvent(m_eventID, result);
183 break;
181 } 184 }
182 setContext(nullptr); 185 setContext(nullptr);
183 } 186 }
184 187
185 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) 188 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*)
186 { 189 {
187 if (!executionContext()) 190 if (!executionContext())
188 return; 191 return;
189 executionContext()->consumeWindowInteraction(); 192 executionContext()->consumeWindowInteraction();
190 } 193 }
191 194
192 DEFINE_TRACE(WaitUntilObserver) 195 DEFINE_TRACE(WaitUntilObserver)
193 { 196 {
194 ContextLifecycleObserver::trace(visitor); 197 ContextLifecycleObserver::trace(visitor);
195 } 198 }
196 199
197 } // namespace blink 200 } // 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