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

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

Issue 1267703003: Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Blink 1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Overload WebServiceWorkerRegistration::update() to land patch sets across the repos. Created 5 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 #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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 static void dispose(WebServiceWorkerRegistration*); 48 static void dispose(WebServiceWorkerRegistration*);
49 49
50 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get (); } 50 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get (); }
51 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); } 51 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); }
52 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); } 52 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); }
53 53
54 String scope() const; 54 String scope() const;
55 55
56 WebServiceWorkerRegistration* webRegistration() { return m_outerRegistration .get(); } 56 WebServiceWorkerRegistration* webRegistration() { return m_outerRegistration .get(); }
57 57
58 void update(ScriptState*, ExceptionState&); 58 ScriptPromise update(ScriptState*);
59 ScriptPromise unregister(ScriptState*); 59 ScriptPromise unregister(ScriptState*);
60 60
61 DEFINE_ATTRIBUTE_EVENT_LISTENER(updatefound); 61 DEFINE_ATTRIBUTE_EVENT_LISTENER(updatefound);
62 62
63 ~ServiceWorkerRegistration() override; 63 ~ServiceWorkerRegistration() override;
64 64
65 // Eager finalization needed to promptly release owned WebServiceWorkerRegis tration. 65 // Eager finalization needed to promptly release owned WebServiceWorkerRegis tration.
66 EAGERLY_FINALIZE(); 66 EAGERLY_FINALIZE();
67 DECLARE_VIRTUAL_TRACE(); 67 DECLARE_VIRTUAL_TRACE();
68 68
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 private: 102 private:
103 WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationArray); 103 WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationArray);
104 ServiceWorkerRegistrationArray() = delete; 104 ServiceWorkerRegistrationArray() = delete;
105 }; 105 };
106 106
107 } // namespace blink 107 } // namespace blink
108 108
109 #endif // ServiceWorkerRegistration_h 109 #endif // ServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698