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

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

Issue 896433005: [WONT COMMIT] ServiceWorker: Move unregister function from WebSWProvider to WebSWRegistration (3/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@unregister-1-3
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerRegistration.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "platform/Supplementable.h" 11 #include "platform/Supplementable.h"
12 #include "public/platform/WebServiceWorkerRegistration.h" 12 #include "public/platform/WebServiceWorkerRegistration.h"
13 #include "public/platform/WebServiceWorkerRegistrationProxy.h" 13 #include "public/platform/WebServiceWorkerRegistrationProxy.h"
14 #include "wtf/OwnPtr.h" 14 #include "wtf/OwnPtr.h"
15 #include "wtf/PassOwnPtr.h" 15 #include "wtf/PassOwnPtr.h"
16 #include "wtf/PassRefPtr.h" 16 #include "wtf/PassRefPtr.h"
17 #include "wtf/RefCounted.h" 17 #include "wtf/RefCounted.h"
18 18
19 namespace blink { 19 namespace blink {
20 20
21 class ScriptPromise; 21 class ScriptPromise;
22 class ScriptPromiseResolver; 22 class ScriptPromiseResolver;
23 class ScriptState; 23 class ScriptState;
24 class WebServiceWorkerProvider;
25 24
26 class ServiceWorkerRegistration final 25 class ServiceWorkerRegistration final
27 : public RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRe gistration> 26 : public RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRe gistration>
28 , public ActiveDOMObject 27 , public ActiveDOMObject
29 , public WebServiceWorkerRegistrationProxy 28 , public WebServiceWorkerRegistrationProxy
30 , public HeapSupplementable<ServiceWorkerRegistration> { 29 , public HeapSupplementable<ServiceWorkerRegistration> {
31 DEFINE_WRAPPERTYPEINFO(); 30 DEFINE_WRAPPERTYPEINFO();
32 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S erviceWorkerRegistration>); 31 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S erviceWorkerRegistration>);
33 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration); 32 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration);
34 USING_PRE_FINALIZER(ServiceWorkerRegistration, dispose); 33 USING_PRE_FINALIZER(ServiceWorkerRegistration, dispose);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 static ServiceWorkerRegistration* getOrCreate(ExecutionContext*, WebServiceW orkerRegistration*); 67 static ServiceWorkerRegistration* getOrCreate(ExecutionContext*, WebServiceW orkerRegistration*);
69 ServiceWorkerRegistration(ExecutionContext*, PassOwnPtr<WebServiceWorkerRegi stration>); 68 ServiceWorkerRegistration(ExecutionContext*, PassOwnPtr<WebServiceWorkerRegi stration>);
70 69
71 // ActiveDOMObject overrides. 70 // ActiveDOMObject overrides.
72 virtual bool hasPendingActivity() const override; 71 virtual bool hasPendingActivity() const override;
73 virtual void stop() override; 72 virtual void stop() override;
74 73
75 void dispose(); 74 void dispose();
76 75
77 OwnPtr<WebServiceWorkerRegistration> m_outerRegistration; 76 OwnPtr<WebServiceWorkerRegistration> m_outerRegistration;
78 WebServiceWorkerProvider* m_provider;
79 RefPtrWillBeMember<ServiceWorker> m_installing; 77 RefPtrWillBeMember<ServiceWorker> m_installing;
80 RefPtrWillBeMember<ServiceWorker> m_waiting; 78 RefPtrWillBeMember<ServiceWorker> m_waiting;
81 RefPtrWillBeMember<ServiceWorker> m_active; 79 RefPtrWillBeMember<ServiceWorker> m_active;
82 80
83 bool m_stopped; 81 bool m_stopped;
84 }; 82 };
85 83
86 } // namespace blink 84 } // namespace blink
87 85
88 #endif // ServiceWorkerRegistration_h 86 #endif // ServiceWorkerRegistration_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698