| 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 "ui/surface/transport_dib.h" | 25 #include "ui/surface/transport_dib.h" |
| 25 | 26 |
| 26 #if defined(USE_MOJO) | |
| 27 #include "mojo/public/cpp/system/core.h" | |
| 28 #endif | |
| 29 | |
| 30 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 27 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
| 31 | 28 |
| 32 namespace base { | 29 namespace base { |
| 33 class CommandLine; | 30 class CommandLine; |
| 34 class MessageLoop; | 31 class MessageLoop; |
| 35 } | 32 } |
| 36 | 33 |
| 37 namespace gfx { | 34 namespace gfx { |
| 38 class Size; | 35 class Size; |
| 39 } | 36 } |
| 40 | 37 |
| 41 namespace content { | 38 namespace content { |
| 42 class AudioRendererHost; | 39 class AudioRendererHost; |
| 43 class BrowserDemuxerAndroid; | 40 class BrowserDemuxerAndroid; |
| 44 class GeolocationDispatcherHost; | 41 class GeolocationDispatcherHost; |
| 45 class GpuMessageFilter; | 42 class GpuMessageFilter; |
| 46 class MessagePortMessageFilter; | 43 class MessagePortMessageFilter; |
| 47 class PeerConnectionTrackerHost; | 44 class PeerConnectionTrackerHost; |
| 48 class RendererMainThread; | 45 class RendererMainThread; |
| 46 class RenderProcessHostMojoImpl; |
| 49 class RenderWidgetHelper; | 47 class RenderWidgetHelper; |
| 50 class RenderWidgetHost; | 48 class RenderWidgetHost; |
| 51 class RenderWidgetHostImpl; | 49 class RenderWidgetHostImpl; |
| 52 class RenderWidgetHostViewFrameSubscriber; | 50 class RenderWidgetHostViewFrameSubscriber; |
| 53 class ScreenOrientationDispatcherHost; | 51 class ScreenOrientationDispatcherHost; |
| 54 class StoragePartition; | 52 class StoragePartition; |
| 55 class StoragePartitionImpl; | 53 class StoragePartitionImpl; |
| 56 | 54 |
| 57 #if defined(USE_MOJO) | |
| 58 class RenderProcessHostMojoImpl; | |
| 59 #endif | |
| 60 | |
| 61 // Implements a concrete RenderProcessHost for the browser process for talking | 55 // Implements a concrete RenderProcessHost for the browser process for talking |
| 62 // to actual renderer processes (as opposed to mocks). | 56 // to actual renderer processes (as opposed to mocks). |
| 63 // | 57 // |
| 64 // Represents the browser side of the browser <--> renderer communication | 58 // Represents the browser side of the browser <--> renderer communication |
| 65 // channel. There will be one RenderProcessHost per renderer process. | 59 // channel. There will be one RenderProcessHost per renderer process. |
| 66 // | 60 // |
| 67 // This object is refcounted so that it can release its resources when all | 61 // This object is refcounted so that it can release its resources when all |
| 68 // hosts using it go away. | 62 // hosts using it go away. |
| 69 // | 63 // |
| 70 // This object communicates back and forth with the RenderProcess object | 64 // This object communicates back and forth with the RenderProcess object |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 void SetIsGuestForTesting(bool is_guest) { | 228 void SetIsGuestForTesting(bool is_guest) { |
| 235 is_guest_ = is_guest; | 229 is_guest_ = is_guest; |
| 236 } | 230 } |
| 237 | 231 |
| 238 // Called when the existence of the other renderer process which is connected | 232 // Called when the existence of the other renderer process which is connected |
| 239 // to the Worker in this renderer process has changed. | 233 // to the Worker in this renderer process has changed. |
| 240 // It is only called when "enable-embedded-shared-worker" flag is set. | 234 // It is only called when "enable-embedded-shared-worker" flag is set. |
| 241 void IncrementWorkerRefCount(); | 235 void IncrementWorkerRefCount(); |
| 242 void DecrementWorkerRefCount(); | 236 void DecrementWorkerRefCount(); |
| 243 | 237 |
| 244 #if defined(USE_MOJO) | |
| 245 void SetWebUIHandle(int32 view_routing_id, | 238 void SetWebUIHandle(int32 view_routing_id, |
| 246 mojo::ScopedMessagePipeHandle handle); | 239 mojo::ScopedMessagePipeHandle handle); |
| 247 #endif | |
| 248 | 240 |
| 249 protected: | 241 protected: |
| 250 // A proxy for our IPC::Channel that lives on the IO thread (see | 242 // A proxy for our IPC::Channel that lives on the IO thread (see |
| 251 // browser_process.h) | 243 // browser_process.h) |
| 252 scoped_ptr<IPC::ChannelProxy> channel_; | 244 scoped_ptr<IPC::ChannelProxy> channel_; |
| 253 | 245 |
| 254 // True if fast shutdown has been performed on this RPH. | 246 // True if fast shutdown has been performed on this RPH. |
| 255 bool fast_shutdown_started_; | 247 bool fast_shutdown_started_; |
| 256 | 248 |
| 257 // True if we've posted a DeleteTask and will be deleted soon. | 249 // True if we've posted a DeleteTask and will be deleted soon. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 #endif | 423 #endif |
| 432 | 424 |
| 433 // Message filter and dispatcher for screen orientation. | 425 // Message filter and dispatcher for screen orientation. |
| 434 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; | 426 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; |
| 435 | 427 |
| 436 int worker_ref_count_; | 428 int worker_ref_count_; |
| 437 | 429 |
| 438 // Records the time when the process starts surviving for workers for UMA. | 430 // Records the time when the process starts surviving for workers for UMA. |
| 439 base::TimeTicks survive_for_worker_start_time_; | 431 base::TimeTicks survive_for_worker_start_time_; |
| 440 | 432 |
| 441 #if defined(USE_MOJO) | |
| 442 scoped_ptr<RenderProcessHostMojoImpl> render_process_host_mojo_; | 433 scoped_ptr<RenderProcessHostMojoImpl> render_process_host_mojo_; |
| 443 #endif | |
| 444 | 434 |
| 445 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 435 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 446 | 436 |
| 447 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 437 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 448 }; | 438 }; |
| 449 | 439 |
| 450 } // namespace content | 440 } // namespace content |
| 451 | 441 |
| 452 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 442 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |