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

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

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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 "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "core/dom/ActiveDOMObject.h" 9 #include "core/dom/ActiveDOMObject.h"
10 #include "core/events/EventTarget.h" 10 #include "core/events/EventTarget.h"
(...skipping 20 matching lines...) Expand all
31 : public RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRe gistration> 31 : public RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRe gistration>
32 , public ActiveDOMObject 32 , public ActiveDOMObject
33 , public WebServiceWorkerRegistrationProxy 33 , public WebServiceWorkerRegistrationProxy
34 , public HeapSupplementable<ServiceWorkerRegistration> { 34 , public HeapSupplementable<ServiceWorkerRegistration> {
35 DEFINE_WRAPPERTYPEINFO(); 35 DEFINE_WRAPPERTYPEINFO();
36 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(ServiceWorkerRegistration); 36 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(ServiceWorkerRegistration);
37 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration); 37 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration);
38 public: 38 public:
39 // EventTarget overrides. 39 // EventTarget overrides.
40 const AtomicString& interfaceName() const override; 40 const AtomicString& interfaceName() const override;
41 ExecutionContext* executionContext() const override { return ActiveDOMObject ::executionContext(); } 41 ExecutionContext* getExecutionContext() const override { return ActiveDOMObj ect::getExecutionContext(); }
42 42
43 // WebServiceWorkerRegistrationProxy overrides. 43 // WebServiceWorkerRegistrationProxy overrides.
44 void dispatchUpdateFoundEvent() override; 44 void dispatchUpdateFoundEvent() override;
45 void setInstalling(WebPassOwnPtr<WebServiceWorker::Handle>) override; 45 void setInstalling(WebPassOwnPtr<WebServiceWorker::Handle>) override;
46 void setWaiting(WebPassOwnPtr<WebServiceWorker::Handle>) override; 46 void setWaiting(WebPassOwnPtr<WebServiceWorker::Handle>) override;
47 void setActive(WebPassOwnPtr<WebServiceWorker::Handle>) override; 47 void setActive(WebPassOwnPtr<WebServiceWorker::Handle>) override;
48 48
49 // Returns an existing registration object for the handle if it exists. 49 // Returns an existing registration object for the handle if it exists.
50 // Otherwise, returns a new registration object. 50 // Otherwise, returns a new registration object.
51 static ServiceWorkerRegistration* getOrCreate(ExecutionContext*, PassOwnPtr< WebServiceWorkerRegistration::Handle>); 51 static ServiceWorkerRegistration* getOrCreate(ExecutionContext*, PassOwnPtr< WebServiceWorkerRegistration::Handle>);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool m_stopped; 87 bool m_stopped;
88 }; 88 };
89 89
90 class ServiceWorkerRegistrationArray { 90 class ServiceWorkerRegistrationArray {
91 STATIC_ONLY(ServiceWorkerRegistrationArray); 91 STATIC_ONLY(ServiceWorkerRegistrationArray);
92 public: 92 public:
93 static HeapVector<Member<ServiceWorkerRegistration>> take(ScriptPromiseResol ver* resolver, Vector<OwnPtr<WebServiceWorkerRegistration::Handle>>* webServiceW orkerRegistrations) 93 static HeapVector<Member<ServiceWorkerRegistration>> take(ScriptPromiseResol ver* resolver, Vector<OwnPtr<WebServiceWorkerRegistration::Handle>>* webServiceW orkerRegistrations)
94 { 94 {
95 HeapVector<Member<ServiceWorkerRegistration>> registrations; 95 HeapVector<Member<ServiceWorkerRegistration>> registrations;
96 for (auto& registration : *webServiceWorkerRegistrations) 96 for (auto& registration : *webServiceWorkerRegistrations)
97 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver ->executionContext(), registration.release())); 97 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver ->getExecutionContext(), registration.release()));
98 return registrations; 98 return registrations;
99 } 99 }
100 }; 100 };
101 101
102 } // namespace blink 102 } // namespace blink
103 103
104 #endif // ServiceWorkerRegistration_h 104 #endif // ServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698