OLD | NEW |
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/public/cpp/system/core.h" | 24 #include "mojo/embedder/scoped_platform_handle.h" |
| 25 #include "mojo/public/cpp/bindings/remote_ptr.h" |
| 26 #include "mojo/public/interfaces/shell/shell.mojom.h" |
25 | 27 |
26 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 28 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
27 | 29 |
28 namespace base { | 30 namespace base { |
29 class CommandLine; | 31 class CommandLine; |
30 class MessageLoop; | 32 class MessageLoop; |
31 } | 33 } |
32 | 34 |
33 namespace gfx { | 35 namespace gfx { |
34 class Size; | 36 class Size; |
35 } | 37 } |
36 | 38 |
37 namespace content { | 39 namespace content { |
38 class AudioRendererHost; | 40 class AudioRendererHost; |
39 class BrowserDemuxerAndroid; | 41 class BrowserDemuxerAndroid; |
40 class GeolocationDispatcherHost; | 42 class GeolocationDispatcherHost; |
41 class GpuMessageFilter; | 43 class GpuMessageFilter; |
42 class MessagePortMessageFilter; | 44 class MessagePortMessageFilter; |
| 45 class MojoApplicationHost; |
43 class PeerConnectionTrackerHost; | 46 class PeerConnectionTrackerHost; |
44 class RendererMainThread; | 47 class RendererMainThread; |
45 class RenderProcessHostMojoImpl; | 48 class RenderProcessHostMojoImpl; |
46 class RenderWidgetHelper; | 49 class RenderWidgetHelper; |
47 class RenderWidgetHost; | 50 class RenderWidgetHost; |
48 class RenderWidgetHostImpl; | 51 class RenderWidgetHostImpl; |
49 class RenderWidgetHostViewFrameSubscriber; | 52 class RenderWidgetHostViewFrameSubscriber; |
50 class ScreenOrientationDispatcherHost; | 53 class ScreenOrientationDispatcherHost; |
51 class StoragePartition; | 54 class StoragePartition; |
52 class StoragePartitionImpl; | 55 class StoragePartitionImpl; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 void SetIsGuestForTesting(bool is_guest) { | 233 void SetIsGuestForTesting(bool is_guest) { |
231 is_guest_ = is_guest; | 234 is_guest_ = is_guest; |
232 } | 235 } |
233 | 236 |
234 // Called when the existence of the other renderer process which is connected | 237 // Called when the existence of the other renderer process which is connected |
235 // to the Worker in this renderer process has changed. | 238 // to the Worker in this renderer process has changed. |
236 // It is only called when "enable-embedded-shared-worker" flag is set. | 239 // It is only called when "enable-embedded-shared-worker" flag is set. |
237 void IncrementWorkerRefCount(); | 240 void IncrementWorkerRefCount(); |
238 void DecrementWorkerRefCount(); | 241 void DecrementWorkerRefCount(); |
239 | 242 |
240 void SetWebUIHandle(int32 view_routing_id, | 243 // Establish a connection to a renderer-provided service. See |
241 mojo::ScopedMessagePipeHandle handle); | 244 // content/common/mojo/mojo_service_names.h for a list of services. |
| 245 void ConnectTo(const base::StringPiece& service_name, |
| 246 mojo::ScopedMessagePipeHandle handle); |
242 | 247 |
243 protected: | 248 protected: |
244 // A proxy for our IPC::Channel that lives on the IO thread (see | 249 // A proxy for our IPC::Channel that lives on the IO thread (see |
245 // browser_process.h) | 250 // browser_process.h) |
246 scoped_ptr<IPC::ChannelProxy> channel_; | 251 scoped_ptr<IPC::ChannelProxy> channel_; |
247 | 252 |
248 // True if fast shutdown has been performed on this RPH. | 253 // True if fast shutdown has been performed on this RPH. |
249 bool fast_shutdown_started_; | 254 bool fast_shutdown_started_; |
250 | 255 |
251 // True if we've posted a DeleteTask and will be deleted soon. | 256 // True if we've posted a DeleteTask and will be deleted soon. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 void ProcessDied(bool already_dead); | 301 void ProcessDied(bool already_dead); |
297 | 302 |
298 virtual void OnGpuSwitching() OVERRIDE; | 303 virtual void OnGpuSwitching() OVERRIDE; |
299 | 304 |
300 #if defined(ENABLE_WEBRTC) | 305 #if defined(ENABLE_WEBRTC) |
301 // Sends |file_for_transit| to the render process. | 306 // Sends |file_for_transit| to the render process. |
302 void SendAecDumpFileToRenderer(IPC::PlatformFileForTransit file_for_transit); | 307 void SendAecDumpFileToRenderer(IPC::PlatformFileForTransit file_for_transit); |
303 void SendDisableAecDumpToRenderer(); | 308 void SendDisableAecDumpToRenderer(); |
304 #endif | 309 #endif |
305 | 310 |
| 311 scoped_ptr<MojoApplicationHost> mojo_application_host_; |
| 312 |
306 // The registered IPC listener objects. When this list is empty, we should | 313 // The registered IPC listener objects. When this list is empty, we should |
307 // delete ourselves. | 314 // delete ourselves. |
308 IDMap<IPC::Listener> listeners_; | 315 IDMap<IPC::Listener> listeners_; |
309 | 316 |
310 // The count of currently visible widgets. Since the host can be a container | 317 // The count of currently visible widgets. Since the host can be a container |
311 // for multiple widgets, it uses this count to determine when it should be | 318 // for multiple widgets, it uses this count to determine when it should be |
312 // backgrounded. | 319 // backgrounded. |
313 int32 visible_widgets_; | 320 int32 visible_widgets_; |
314 | 321 |
315 // Does this process have backgrounded priority. | 322 // Does this process have backgrounded priority. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 #endif | 416 #endif |
410 | 417 |
411 // Message filter and dispatcher for screen orientation. | 418 // Message filter and dispatcher for screen orientation. |
412 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; | 419 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; |
413 | 420 |
414 int worker_ref_count_; | 421 int worker_ref_count_; |
415 | 422 |
416 // Records the time when the process starts surviving for workers for UMA. | 423 // Records the time when the process starts surviving for workers for UMA. |
417 base::TimeTicks survive_for_worker_start_time_; | 424 base::TimeTicks survive_for_worker_start_time_; |
418 | 425 |
419 scoped_ptr<RenderProcessHostMojoImpl> render_process_host_mojo_; | |
420 | |
421 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 426 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
422 | 427 |
423 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 428 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
424 }; | 429 }; |
425 | 430 |
426 } // namespace content | 431 } // namespace content |
427 | 432 |
428 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 433 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |