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

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: rebase on 478693005 (Ship Oilpan for serviceworkers/) 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 25 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainer.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698