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

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

Issue 1865913005: Nuke WebPassOwnPtr<T> and replace it with std::unique_ptr<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/ActiveDOMObject.h" 10 #include "core/dom/ActiveDOMObject.h"
(...skipping 26 matching lines...) Expand all
37 DEFINE_WRAPPERTYPEINFO(); 37 DEFINE_WRAPPERTYPEINFO();
38 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(ServiceWorkerRegistration); 38 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(ServiceWorkerRegistration);
39 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration); 39 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration);
40 public: 40 public:
41 // EventTarget overrides. 41 // EventTarget overrides.
42 const AtomicString& interfaceName() const override; 42 const AtomicString& interfaceName() const override;
43 ExecutionContext* getExecutionContext() const override { return ActiveDOMObj ect::getExecutionContext(); } 43 ExecutionContext* getExecutionContext() const override { return ActiveDOMObj ect::getExecutionContext(); }
44 44
45 // WebServiceWorkerRegistrationProxy overrides. 45 // WebServiceWorkerRegistrationProxy overrides.
46 void dispatchUpdateFoundEvent() override; 46 void dispatchUpdateFoundEvent() override;
47 void setInstalling(WebPassOwnPtr<WebServiceWorker::Handle>) override; 47 void setInstalling(std::unique_ptr<WebServiceWorker::Handle>) override;
48 void setWaiting(WebPassOwnPtr<WebServiceWorker::Handle>) override; 48 void setWaiting(std::unique_ptr<WebServiceWorker::Handle>) override;
49 void setActive(WebPassOwnPtr<WebServiceWorker::Handle>) override; 49 void setActive(std::unique_ptr<WebServiceWorker::Handle>) override;
50 50
51 // Returns an existing registration object for the handle if it exists. 51 // Returns an existing registration object for the handle if it exists.
52 // Otherwise, returns a new registration object. 52 // Otherwise, returns a new registration object.
53 static ServiceWorkerRegistration* getOrCreate(ExecutionContext*, PassOwnPtr< WebServiceWorkerRegistration::Handle>); 53 static ServiceWorkerRegistration* getOrCreate(ExecutionContext*, PassOwnPtr< WebServiceWorkerRegistration::Handle>);
54 54
55 ServiceWorker* installing() { return m_installing; } 55 ServiceWorker* installing() { return m_installing; }
56 ServiceWorker* waiting() { return m_waiting; } 56 ServiceWorker* waiting() { return m_waiting; }
57 ServiceWorker* active() { return m_active; } 57 ServiceWorker* active() { return m_active; }
58 58
59 String scope() const; 59 String scope() const;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 HeapVector<Member<ServiceWorkerRegistration>> registrations; 99 HeapVector<Member<ServiceWorkerRegistration>> registrations;
100 for (auto& registration : *webServiceWorkerRegistrations) 100 for (auto& registration : *webServiceWorkerRegistrations)
101 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver ->getExecutionContext(), registration.release())); 101 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver ->getExecutionContext(), registration.release()));
102 return registrations; 102 return registrations;
103 } 103 }
104 }; 104 };
105 105
106 } // namespace blink 106 } // namespace blink
107 107
108 #endif // ServiceWorkerRegistration_h 108 #endif // ServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698