| 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 #ifndef ServiceWorkerRegistration_h | 5 #ifndef ServiceWorkerRegistration_h |
| 6 #define ServiceWorkerRegistration_h | 6 #define ServiceWorkerRegistration_h |
| 7 | 7 |
| 8 #include "core/dom/ActiveDOMObject.h" | 8 #include "core/dom/ActiveDOMObject.h" |
| 9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
| 10 #include "modules/serviceworkers/ServiceWorker.h" | 10 #include "modules/serviceworkers/ServiceWorker.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD
OMObject::executionContext(); } | 36 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD
OMObject::executionContext(); } |
| 37 | 37 |
| 38 // WebServiceWorkerRegistrationProxy overrides. | 38 // WebServiceWorkerRegistrationProxy overrides. |
| 39 virtual void dispatchUpdateFoundEvent() OVERRIDE; | 39 virtual void dispatchUpdateFoundEvent() OVERRIDE; |
| 40 virtual void setInstalling(WebServiceWorker*) OVERRIDE; | 40 virtual void setInstalling(WebServiceWorker*) OVERRIDE; |
| 41 virtual void setWaiting(WebServiceWorker*) OVERRIDE; | 41 virtual void setWaiting(WebServiceWorker*) OVERRIDE; |
| 42 virtual void setActive(WebServiceWorker*) OVERRIDE; | 42 virtual void setActive(WebServiceWorker*) OVERRIDE; |
| 43 | 43 |
| 44 // For CallbackPromiseAdapter. | 44 // For CallbackPromiseAdapter. |
| 45 typedef WebServiceWorkerRegistration WebType; | 45 typedef WebServiceWorkerRegistration WebType; |
| 46 static ServiceWorkerRegistration* from(ExecutionContext*, WebType* registrat
ion); |
| 46 static ServiceWorkerRegistration* take(ScriptPromiseResolver*, WebType* regi
stration); | 47 static ServiceWorkerRegistration* take(ScriptPromiseResolver*, WebType* regi
stration); |
| 47 static void dispose(WebType* registration); | 48 static void dispose(WebType* registration); |
| 48 | 49 |
| 49 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get
(); } | 50 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get
(); } |
| 50 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); } | 51 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); } |
| 51 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); } | 52 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); } |
| 52 | 53 |
| 53 String scope() const; | 54 String scope() const; |
| 54 | 55 |
| 55 ScriptPromise unregister(ScriptState*); | 56 ScriptPromise unregister(ScriptState*); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 71 RefPtrWillBeMember<ServiceWorker> m_installing; | 72 RefPtrWillBeMember<ServiceWorker> m_installing; |
| 72 RefPtrWillBeMember<ServiceWorker> m_waiting; | 73 RefPtrWillBeMember<ServiceWorker> m_waiting; |
| 73 RefPtrWillBeMember<ServiceWorker> m_active; | 74 RefPtrWillBeMember<ServiceWorker> m_active; |
| 74 | 75 |
| 75 bool m_stopped; | 76 bool m_stopped; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace blink | 79 } // namespace blink |
| 79 | 80 |
| 80 #endif // ServiceWorkerRegistration_h | 81 #endif // ServiceWorkerRegistration_h |
| OLD | NEW |