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

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

Issue 466723002: ServiceWorker: Enable ServiceWorkerRegistration and update layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@updatefound
Patch Set: rebase Created 6 years, 4 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 "ServiceWorkerRegistration.h" 6 #include "ServiceWorkerRegistration.h"
7 7
8 #include "bindings/core/v8/CallbackPromiseAdapter.h" 8 #include "bindings/core/v8/CallbackPromiseAdapter.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
11 #include "bindings/core/v8/ScriptState.h" 11 #include "bindings/core/v8/ScriptState.h"
12 #include "core/dom/DOMException.h" 12 #include "core/dom/DOMException.h"
13 #include "core/dom/ExceptionCode.h" 13 #include "core/dom/ExceptionCode.h"
14 #include "core/dom/ExecutionContext.h" 14 #include "core/dom/ExecutionContext.h"
15 #include "core/events/Event.h" 15 #include "core/events/Event.h"
16 #include "modules/EventTargetModules.h" 16 #include "modules/EventTargetModules.h"
17 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" 17 #include "modules/serviceworkers/ServiceWorkerContainerClient.h"
18 #include "modules/serviceworkers/ServiceWorkerError.h" 18 #include "modules/serviceworkers/ServiceWorkerError.h"
19 #include "public/platform/WebServiceWorkerProvider.h" 19 #include "public/platform/WebServiceWorkerProvider.h"
20 20
21 namespace blink { 21 namespace blink {
22 22
23 class UndefinedValue { 23 class UndefinedValue {
24 public: 24 public:
25 #ifdef DISABLE_SERVICE_WORKER_REGISTRATION
26 typedef WebServiceWorker WebType;
27 #else
28 typedef WebServiceWorkerRegistration WebType; 25 typedef WebServiceWorkerRegistration WebType;
29 #endif
30 static V8UndefinedType take(ScriptPromiseResolver* resolver, WebType* regist ration) 26 static V8UndefinedType take(ScriptPromiseResolver* resolver, WebType* regist ration)
31 { 27 {
32 ASSERT(!registration); // Anything passed here will be leaked. 28 ASSERT(!registration); // Anything passed here will be leaked.
33 return V8UndefinedType(); 29 return V8UndefinedType();
34 } 30 }
35 static void dispose(WebType* registration) 31 static void dispose(WebType* registration)
36 { 32 {
37 ASSERT(!registration); // Anything passed here will be leaked. 33 ASSERT(!registration); // Anything passed here will be leaked.
38 } 34 }
39 35
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 170
175 void ServiceWorkerRegistration::stop() 171 void ServiceWorkerRegistration::stop()
176 { 172 {
177 if (m_stopped) 173 if (m_stopped)
178 return; 174 return;
179 m_stopped = true; 175 m_stopped = true;
180 m_outerRegistration->proxyStopped(); 176 m_outerRegistration->proxyStopped();
181 } 177 }
182 178
183 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainer.cpp ('k') | public/platform/WebServiceWorkerProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698