| 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/dom_storage/session_storage_namespace_impl.h" | 17 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 18 #include "content/browser/mojo/mojo_application_host.h" |
| 18 #include "content/browser/power_monitor_message_broadcaster.h" | 19 #include "content/browser/power_monitor_message_broadcaster.h" |
| 19 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 21 #include "content/common/mojo/service_registry_impl.h" |
| 20 #include "content/public/browser/gpu_data_manager_observer.h" | 22 #include "content/public/browser/gpu_data_manager_observer.h" |
| 21 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
| 22 #include "ipc/ipc_channel_proxy.h" | 24 #include "ipc/ipc_channel_proxy.h" |
| 23 #include "ipc/ipc_platform_file.h" | 25 #include "ipc/ipc_platform_file.h" |
| 24 #include "mojo/public/cpp/bindings/interface_ptr.h" | 26 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 25 | 27 |
| 26 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
| 27 #include <IOSurface/IOSurfaceAPI.h> | 29 #include <IOSurface/IOSurfaceAPI.h> |
| 28 #include "base/mac/scoped_cftyperef.h" | 30 #include "base/mac/scoped_cftyperef.h" |
| 29 #endif | 31 #endif |
| 30 | 32 |
| 31 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 33 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
| 32 | 34 |
| 33 namespace base { | 35 namespace base { |
| 34 class CommandLine; | 36 class CommandLine; |
| 35 class MessageLoop; | 37 class MessageLoop; |
| 36 } | 38 } |
| 37 | 39 |
| 38 namespace gfx { | 40 namespace gfx { |
| 39 class Size; | 41 class Size; |
| 40 struct GpuMemoryBufferHandle; | 42 struct GpuMemoryBufferHandle; |
| 41 } | 43 } |
| 42 | 44 |
| 43 namespace content { | 45 namespace content { |
| 44 class AudioRendererHost; | 46 class AudioRendererHost; |
| 45 class BrowserDemuxerAndroid; | 47 class BrowserDemuxerAndroid; |
| 46 class GpuMessageFilter; | 48 class GpuMessageFilter; |
| 47 class MessagePortMessageFilter; | 49 class MessagePortMessageFilter; |
| 48 class MojoApplicationHost; | |
| 49 #if defined(ENABLE_WEBRTC) | 50 #if defined(ENABLE_WEBRTC) |
| 50 class P2PSocketDispatcherHost; | 51 class P2PSocketDispatcherHost; |
| 51 #endif | 52 #endif |
| 52 class PeerConnectionTrackerHost; | 53 class PeerConnectionTrackerHost; |
| 53 class RendererMainThread; | 54 class RendererMainThread; |
| 54 class RenderProcessHostMojoImpl; | |
| 55 class RenderWidgetHelper; | 55 class RenderWidgetHelper; |
| 56 class RenderWidgetHost; | 56 class RenderWidgetHost; |
| 57 class RenderWidgetHostImpl; | 57 class RenderWidgetHostImpl; |
| 58 class RenderWidgetHostViewFrameSubscriber; | 58 class RenderWidgetHostViewFrameSubscriber; |
| 59 class StoragePartition; | 59 class StoragePartition; |
| 60 class StoragePartitionImpl; | 60 class StoragePartitionImpl; |
| 61 | 61 |
| 62 typedef base::Thread* (*RendererMainThreadFactoryFunction)( | 62 typedef base::Thread* (*RendererMainThreadFactoryFunction)( |
| 63 const std::string& id); | 63 const std::string& id); |
| 64 | 64 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 virtual void SetWebRtcLogMessageCallback( | 136 virtual void SetWebRtcLogMessageCallback( |
| 137 base::Callback<void(const std::string&)> callback) OVERRIDE; | 137 base::Callback<void(const std::string&)> callback) OVERRIDE; |
| 138 virtual WebRtcStopRtpDumpCallback StartRtpDump( | 138 virtual WebRtcStopRtpDumpCallback StartRtpDump( |
| 139 bool incoming, | 139 bool incoming, |
| 140 bool outgoing, | 140 bool outgoing, |
| 141 const WebRtcRtpPacketCallback& packet_callback) OVERRIDE; | 141 const WebRtcRtpPacketCallback& packet_callback) OVERRIDE; |
| 142 #endif | 142 #endif |
| 143 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) | 143 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) |
| 144 OVERRIDE; | 144 OVERRIDE; |
| 145 virtual void NotifyTimezoneChange() OVERRIDE; | 145 virtual void NotifyTimezoneChange() OVERRIDE; |
| 146 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE; |
| 147 virtual void ActivateMojo() OVERRIDE; |
| 146 | 148 |
| 147 // IPC::Sender via RenderProcessHost. | 149 // IPC::Sender via RenderProcessHost. |
| 148 virtual bool Send(IPC::Message* msg) OVERRIDE; | 150 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 149 | 151 |
| 150 // IPC::Listener via RenderProcessHost. | 152 // IPC::Listener via RenderProcessHost. |
| 151 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 153 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 152 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 154 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 153 virtual void OnChannelError() OVERRIDE; | 155 virtual void OnChannelError() OVERRIDE; |
| 154 virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE; | 156 virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE; |
| 155 | 157 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 void set_is_isolated_guest_for_testing(bool is_isolated_guest) { | 245 void set_is_isolated_guest_for_testing(bool is_isolated_guest) { |
| 244 is_isolated_guest_ = is_isolated_guest; | 246 is_isolated_guest_ = is_isolated_guest; |
| 245 } | 247 } |
| 246 | 248 |
| 247 // Called when the existence of the other renderer process which is connected | 249 // Called when the existence of the other renderer process which is connected |
| 248 // to the Worker in this renderer process has changed. | 250 // to the Worker in this renderer process has changed. |
| 249 // It is only called when "enable-embedded-shared-worker" flag is set. | 251 // It is only called when "enable-embedded-shared-worker" flag is set. |
| 250 void IncrementWorkerRefCount(); | 252 void IncrementWorkerRefCount(); |
| 251 void DecrementWorkerRefCount(); | 253 void DecrementWorkerRefCount(); |
| 252 | 254 |
| 253 // Establish a connection to a renderer-provided service. See | |
| 254 // content/common/mojo/mojo_service_names.h for a list of services. | |
| 255 void ConnectTo(const base::StringPiece& service_name, | |
| 256 mojo::ScopedMessagePipeHandle handle); | |
| 257 | |
| 258 template <typename Interface> | |
| 259 void ConnectTo(const base::StringPiece& service_name, | |
| 260 mojo::InterfacePtr<Interface>* ptr) { | |
| 261 mojo::MessagePipe pipe; | |
| 262 ptr->Bind(pipe.handle0.Pass()); | |
| 263 ConnectTo(service_name, pipe.handle1.Pass()); | |
| 264 } | |
| 265 | |
| 266 protected: | 255 protected: |
| 267 // A proxy for our IPC::Channel that lives on the IO thread (see | 256 // A proxy for our IPC::Channel that lives on the IO thread (see |
| 268 // browser_process.h) | 257 // browser_process.h) |
| 269 scoped_ptr<IPC::ChannelProxy> channel_; | 258 scoped_ptr<IPC::ChannelProxy> channel_; |
| 270 | 259 |
| 271 // True if fast shutdown has been performed on this RPH. | 260 // True if fast shutdown has been performed on this RPH. |
| 272 bool fast_shutdown_started_; | 261 bool fast_shutdown_started_; |
| 273 | 262 |
| 274 // True if we've posted a DeleteTask and will be deleted soon. | 263 // True if we've posted a DeleteTask and will be deleted soon. |
| 275 bool deleting_soon_; | 264 bool deleting_soon_; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 #if defined(OS_MACOSX) | 446 #if defined(OS_MACOSX) |
| 458 base::ScopedCFTypeRef<IOSurfaceRef> last_io_surface_; | 447 base::ScopedCFTypeRef<IOSurfaceRef> last_io_surface_; |
| 459 #endif | 448 #endif |
| 460 | 449 |
| 461 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 450 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 462 }; | 451 }; |
| 463 | 452 |
| 464 } // namespace content | 453 } // namespace content |
| 465 | 454 |
| 466 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 455 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |