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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
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_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/process/process.h" 14 #include "base/process/process.h"
15 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
16 #include "content/browser/child_process_launcher.h" 16 #include "content/browser/child_process_launcher.h"
17 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 17 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
18 #include "content/browser/power_monitor_message_broadcaster.h" 18 #include "content/browser/power_monitor_message_broadcaster.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/public/browser/gpu_data_manager_observer.h" 20 #include "content/public/browser/gpu_data_manager_observer.h"
21 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
22 #include "ipc/ipc_channel_proxy.h" 22 #include "ipc/ipc_channel_proxy.h"
23 #include "ipc/ipc_platform_file.h" 23 #include "ipc/ipc_platform_file.h"
24 #include "mojo/embedder/scoped_platform_handle.h" 24 #include "mojo/public/cpp/bindings/interface_ptr.h"
25 #include "mojo/public/cpp/bindings/remote_ptr.h"
26 #include "mojo/public/interfaces/shell/shell.mojom.h"
27 25
28 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; 26 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;
29 27
30 namespace base { 28 namespace base {
31 class CommandLine; 29 class CommandLine;
32 class MessageLoop; 30 class MessageLoop;
33 } 31 }
34 32
35 namespace gfx { 33 namespace gfx {
36 class Size; 34 class Size;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // to the Worker in this renderer process has changed. 236 // to the Worker in this renderer process has changed.
239 // It is only called when "enable-embedded-shared-worker" flag is set. 237 // It is only called when "enable-embedded-shared-worker" flag is set.
240 void IncrementWorkerRefCount(); 238 void IncrementWorkerRefCount();
241 void DecrementWorkerRefCount(); 239 void DecrementWorkerRefCount();
242 240
243 // Establish a connection to a renderer-provided service. See 241 // Establish a connection to a renderer-provided service. See
244 // content/common/mojo/mojo_service_names.h for a list of services. 242 // content/common/mojo/mojo_service_names.h for a list of services.
245 void ConnectTo(const base::StringPiece& service_name, 243 void ConnectTo(const base::StringPiece& service_name,
246 mojo::ScopedMessagePipeHandle handle); 244 mojo::ScopedMessagePipeHandle handle);
247 245
246 template <typename Interface>
247 void ConnectTo(const base::StringPiece& service_name,
248 mojo::InterfacePtr<Interface>* ptr) {
249 mojo::MessagePipe pipe;
250 ptr->Bind(pipe.handle0.Pass());
251 ConnectTo(service_name, pipe.handle1.Pass());
252 }
253
248 protected: 254 protected:
249 // A proxy for our IPC::Channel that lives on the IO thread (see 255 // A proxy for our IPC::Channel that lives on the IO thread (see
250 // browser_process.h) 256 // browser_process.h)
251 scoped_ptr<IPC::ChannelProxy> channel_; 257 scoped_ptr<IPC::ChannelProxy> channel_;
252 258
253 // True if fast shutdown has been performed on this RPH. 259 // True if fast shutdown has been performed on this RPH.
254 bool fast_shutdown_started_; 260 bool fast_shutdown_started_;
255 261
256 // True if we've posted a DeleteTask and will be deleted soon. 262 // True if we've posted a DeleteTask and will be deleted soon.
257 bool deleting_soon_; 263 bool deleting_soon_;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 base::TimeTicks survive_for_worker_start_time_; 433 base::TimeTicks survive_for_worker_start_time_;
428 434
429 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 435 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
430 436
431 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 437 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
432 }; 438 };
433 439
434 } // namespace content 440 } // namespace content
435 441
436 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 442 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698