OLD | NEW |
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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #ifdef DISABLE_SERVICE_WORKER_REGISTRATION | 24 #ifdef DISABLE_SERVICE_WORKER_REGISTRATION |
25 typedef WebServiceWorker WebType; | 25 typedef WebServiceWorker WebType; |
26 #else | 26 #else |
27 typedef WebServiceWorkerRegistration WebType; | 27 typedef WebServiceWorkerRegistration WebType; |
28 #endif | 28 #endif |
29 static V8UndefinedType from(ScriptPromiseResolver* resolver, WebType* regist
ration) | 29 static V8UndefinedType from(ScriptPromiseResolver* resolver, WebType* regist
ration) |
30 { | 30 { |
31 ASSERT(!registration); // Anything passed here will be leaked. | 31 ASSERT(!registration); // Anything passed here will be leaked. |
32 return V8UndefinedType(); | 32 return V8UndefinedType(); |
33 } | 33 } |
| 34 static void dispose(WebType* registration) |
| 35 { |
| 36 ASSERT(!registration); // Anything passed here will be leaked. |
| 37 } |
34 | 38 |
35 private: | 39 private: |
36 UndefinedValue(); | 40 UndefinedValue(); |
37 }; | 41 }; |
38 | 42 |
39 const AtomicString& ServiceWorkerRegistration::interfaceName() const | 43 const AtomicString& ServiceWorkerRegistration::interfaceName() const |
40 { | 44 { |
41 return EventTargetNames::ServiceWorkerRegistration; | 45 return EventTargetNames::ServiceWorkerRegistration; |
42 } | 46 } |
43 | 47 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 ASSERT(m_outerRegistration); | 94 ASSERT(m_outerRegistration); |
91 ScriptWrappable::init(this); | 95 ScriptWrappable::init(this); |
92 | 96 |
93 if (!executionContext) | 97 if (!executionContext) |
94 return; | 98 return; |
95 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro
m(executionContext)) | 99 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro
m(executionContext)) |
96 m_provider = client->provider(); | 100 m_provider = client->provider(); |
97 } | 101 } |
98 | 102 |
99 } // namespace blink | 103 } // namespace blink |
OLD | NEW |