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

Side by Side Diff: content/browser/ppapi_plugin_process_host.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <queue> 11 #include <queue>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/process/process.h" 17 #include "base/process/process.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" 19 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
20 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 20 #include "content/browser/renderer_host/pepper/pepper_message_filter.h"
21 #include "content/public/browser/browser_child_process_host_delegate.h" 21 #include "content/public/browser/browser_child_process_host_delegate.h"
22 #include "content/public/browser/browser_child_process_host_iterator.h" 22 #include "content/public/browser/browser_child_process_host_iterator.h"
23 #include "ipc/ipc_sender.h" 23 #include "ipc/ipc_sender.h"
24 #include "ppapi/shared_impl/ppapi_permissions.h" 24 #include "ppapi/shared_impl/ppapi_permissions.h"
25 25
26 namespace content { 26 namespace content {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void CancelRequests(); 148 void CancelRequests();
149 149
150 // IPC message handlers. 150 // IPC message handlers.
151 void OnRendererPluginChannelCreated(const IPC::ChannelHandle& handle); 151 void OnRendererPluginChannelCreated(const IPC::ChannelHandle& handle);
152 152
153 // Handles most requests from the plugin. May be NULL. 153 // Handles most requests from the plugin. May be NULL.
154 scoped_refptr<PepperMessageFilter> filter_; 154 scoped_refptr<PepperMessageFilter> filter_;
155 155
156 ppapi::PpapiPermissions permissions_; 156 ppapi::PpapiPermissions permissions_;
157 scoped_ptr<BrowserPpapiHostImpl> host_impl_; 157 std::unique_ptr<BrowserPpapiHostImpl> host_impl_;
158 158
159 // Observes network changes. May be NULL. 159 // Observes network changes. May be NULL.
160 scoped_ptr<PluginNetworkObserver> network_observer_; 160 std::unique_ptr<PluginNetworkObserver> network_observer_;
161 161
162 // Channel requests that we are waiting to send to the plugin process once 162 // Channel requests that we are waiting to send to the plugin process once
163 // the channel is opened. 163 // the channel is opened.
164 std::vector<Client*> pending_requests_; 164 std::vector<Client*> pending_requests_;
165 165
166 // Channel requests that we have already sent to the plugin process, but 166 // Channel requests that we have already sent to the plugin process, but
167 // haven't heard back about yet. 167 // haven't heard back about yet.
168 std::queue<Client*> sent_requests_; 168 std::queue<Client*> sent_requests_;
169 169
170 // Path to the plugin library. 170 // Path to the plugin library.
171 base::FilePath plugin_path_; 171 base::FilePath plugin_path_;
172 172
173 // Path to the top-level plugin data directory (differs based upon profile). 173 // Path to the top-level plugin data directory (differs based upon profile).
174 base::FilePath profile_data_directory_; 174 base::FilePath profile_data_directory_;
175 175
176 const bool is_broker_; 176 const bool is_broker_;
177 177
178 scoped_ptr<BrowserChildProcessHostImpl> process_; 178 std::unique_ptr<BrowserChildProcessHostImpl> process_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(PpapiPluginProcessHost); 180 DISALLOW_COPY_AND_ASSIGN(PpapiPluginProcessHost);
181 }; 181 };
182 182
183 class PpapiPluginProcessHostIterator 183 class PpapiPluginProcessHostIterator
184 : public BrowserChildProcessHostTypeIterator< 184 : public BrowserChildProcessHostTypeIterator<
185 PpapiPluginProcessHost> { 185 PpapiPluginProcessHost> {
186 public: 186 public:
187 PpapiPluginProcessHostIterator() 187 PpapiPluginProcessHostIterator()
188 : BrowserChildProcessHostTypeIterator< 188 : BrowserChildProcessHostTypeIterator<
189 PpapiPluginProcessHost>(PROCESS_TYPE_PPAPI_PLUGIN) {} 189 PpapiPluginProcessHost>(PROCESS_TYPE_PPAPI_PLUGIN) {}
190 }; 190 };
191 191
192 class PpapiBrokerProcessHostIterator 192 class PpapiBrokerProcessHostIterator
193 : public BrowserChildProcessHostTypeIterator< 193 : public BrowserChildProcessHostTypeIterator<
194 PpapiPluginProcessHost> { 194 PpapiPluginProcessHost> {
195 public: 195 public:
196 PpapiBrokerProcessHostIterator() 196 PpapiBrokerProcessHostIterator()
197 : BrowserChildProcessHostTypeIterator< 197 : BrowserChildProcessHostTypeIterator<
198 PpapiPluginProcessHost>(PROCESS_TYPE_PPAPI_BROKER) {} 198 PpapiPluginProcessHost>(PROCESS_TYPE_PPAPI_BROKER) {}
199 }; 199 };
200 200
201 } // namespace content 201 } // namespace content
202 202
203 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 203 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
204 204
OLDNEW
« no previous file with comments | « content/browser/power_usage_monitor_impl_unittest.cc ('k') | content/browser/presentation/presentation_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698