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

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

Issue 476043002: ServiceWorker: Make '.ready' return a promise to be resolved with ServiceWorkerRegistration (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix win build Created 6 years, 3 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 #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 24 matching lines...) Expand all
35 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } 35 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
36 36
37 // WebServiceWorkerRegistrationProxy overrides. 37 // WebServiceWorkerRegistrationProxy overrides.
38 virtual void dispatchUpdateFoundEvent() OVERRIDE; 38 virtual void dispatchUpdateFoundEvent() OVERRIDE;
39 virtual void setInstalling(WebServiceWorker*) OVERRIDE; 39 virtual void setInstalling(WebServiceWorker*) OVERRIDE;
40 virtual void setWaiting(WebServiceWorker*) OVERRIDE; 40 virtual void setWaiting(WebServiceWorker*) OVERRIDE;
41 virtual void setActive(WebServiceWorker*) OVERRIDE; 41 virtual void setActive(WebServiceWorker*) OVERRIDE;
42 42
43 // For CallbackPromiseAdapter. 43 // For CallbackPromiseAdapter.
44 typedef WebServiceWorkerRegistration WebType; 44 typedef WebServiceWorkerRegistration WebType;
45 static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> from(ExecutionConte xt*, WebType* registration);
45 static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> take(ScriptPromiseR esolver*, WebType* registration); 46 static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> take(ScriptPromiseR esolver*, WebType* registration);
46 static void dispose(WebType* registration); 47 static void dispose(WebType* registration);
47 48
48 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get (); } 49 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get (); }
49 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); } 50 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); }
50 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); } 51 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); }
51 52
52 String scope() const; 53 String scope() const;
53 54
54 ScriptPromise unregister(ScriptState*); 55 ScriptPromise unregister(ScriptState*);
(...skipping 15 matching lines...) Expand all
70 RefPtrWillBeMember<ServiceWorker> m_installing; 71 RefPtrWillBeMember<ServiceWorker> m_installing;
71 RefPtrWillBeMember<ServiceWorker> m_waiting; 72 RefPtrWillBeMember<ServiceWorker> m_waiting;
72 RefPtrWillBeMember<ServiceWorker> m_active; 73 RefPtrWillBeMember<ServiceWorker> m_active;
73 74
74 bool m_stopped; 75 bool m_stopped;
75 }; 76 };
76 77
77 } // namespace blink 78 } // namespace blink
78 79
79 #endif // ServiceWorkerRegistration_h 80 #endif // ServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698