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

Side by Side Diff: content/child/service_worker/web_service_worker_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
7 7
8 #include <memory>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
16 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" 17 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
17 #include "third_party/WebKit/public/platform/WebPassOwnPtr.h"
18 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor ker.h" 18 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor ker.h"
19 #include "third_party/WebKit/public/web/WebFrame.h" 19 #include "third_party/WebKit/public/web/WebFrame.h"
20 20
21 namespace blink { 21 namespace blink {
22 class WebServiceWorkerProxy; 22 class WebServiceWorkerProxy;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 26
27 class ServiceWorkerHandleReference; 27 class ServiceWorkerHandleReference;
(...skipping 22 matching lines...) Expand all
50 blink::WebURL url() const override; 50 blink::WebURL url() const override;
51 blink::WebServiceWorkerState state() const override; 51 blink::WebServiceWorkerState state() const override;
52 void postMessage(blink::WebServiceWorkerProvider* provider, 52 void postMessage(blink::WebServiceWorkerProvider* provider,
53 const blink::WebString& message, 53 const blink::WebString& message,
54 const blink::WebSecurityOrigin& source_origin, 54 const blink::WebSecurityOrigin& source_origin,
55 blink::WebMessagePortChannelArray* channels) override; 55 blink::WebMessagePortChannelArray* channels) override;
56 void terminate() override; 56 void terminate() override;
57 57
58 // Creates WebServiceWorker::Handle object that owns a reference to the given 58 // Creates WebServiceWorker::Handle object that owns a reference to the given
59 // WebServiceWorkerImpl object. 59 // WebServiceWorkerImpl object.
60 static blink::WebPassOwnPtr<blink::WebServiceWorker::Handle> CreateHandle( 60 static std::unique_ptr<blink::WebServiceWorker::Handle> CreateHandle(
61 const scoped_refptr<WebServiceWorkerImpl>& worker); 61 const scoped_refptr<WebServiceWorkerImpl>& worker);
62 62
63 private: 63 private:
64 friend class base::RefCounted<WebServiceWorkerImpl>; 64 friend class base::RefCounted<WebServiceWorkerImpl>;
65 ~WebServiceWorkerImpl() override; 65 ~WebServiceWorkerImpl() override;
66 66
67 scoped_ptr<ServiceWorkerHandleReference> handle_ref_; 67 scoped_ptr<ServiceWorkerHandleReference> handle_ref_;
68 blink::WebServiceWorkerState state_; 68 blink::WebServiceWorkerState state_;
69 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 69 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
70 blink::WebServiceWorkerProxy* proxy_; 70 blink::WebServiceWorkerProxy* proxy_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); 72 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl);
73 }; 73 };
74 74
75 } // namespace content 75 } // namespace content
76 76
77 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 77 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698