| 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/process/process.h" | 13 #include "base/process/process.h" |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "content/browser/child_process_launcher.h" | 15 #include "content/browser/child_process_launcher.h" |
| 16 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
| 16 #include "content/browser/power_monitor_message_broadcaster.h" | 17 #include "content/browser/power_monitor_message_broadcaster.h" |
| 17 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 18 #include "content/public/browser/global_request_id.h" | 19 #include "content/public/browser/global_request_id.h" |
| 19 #include "content/public/browser/gpu_data_manager_observer.h" | 20 #include "content/public/browser/gpu_data_manager_observer.h" |
| 20 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 21 #include "ipc/ipc_channel_proxy.h" | 22 #include "ipc/ipc_channel_proxy.h" |
| 22 #include "ui/surface/transport_dib.h" | 23 #include "ui/surface/transport_dib.h" |
| 23 | 24 |
| 24 class CommandLine; | 25 class CommandLine; |
| 25 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 26 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class MessageLoop; | 29 class MessageLoop; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace gfx { | 32 namespace gfx { |
| 32 class Size; | 33 class Size; |
| 33 } | 34 } |
| 34 | 35 |
| 35 namespace content { | 36 namespace content { |
| 36 class AudioRendererHost; | 37 class AudioRendererHost; |
| 37 class BrowserDemuxerAndroid; | 38 class BrowserDemuxerAndroid; |
| 39 class GeolocationDispatcherHost; |
| 38 class GpuMessageFilter; | 40 class GpuMessageFilter; |
| 39 class MessagePortMessageFilter; | 41 class MessagePortMessageFilter; |
| 40 class PeerConnectionTrackerHost; | 42 class PeerConnectionTrackerHost; |
| 41 class RendererMainThread; | 43 class RendererMainThread; |
| 42 class RenderWidgetHelper; | 44 class RenderWidgetHelper; |
| 43 class RenderWidgetHost; | 45 class RenderWidgetHost; |
| 44 class RenderWidgetHostImpl; | 46 class RenderWidgetHostImpl; |
| 45 class RenderWidgetHostViewFrameSubscriber; | 47 class RenderWidgetHostViewFrameSubscriber; |
| 46 class StoragePartition; | 48 class StoragePartition; |
| 47 class StoragePartitionImpl; | 49 class StoragePartitionImpl; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // any RenderViewHosts that are swapped out. | 145 // any RenderViewHosts that are swapped out. |
| 144 int GetActiveViewCount(); | 146 int GetActiveViewCount(); |
| 145 | 147 |
| 146 // Start and end frame subscription for a specific renderer. | 148 // Start and end frame subscription for a specific renderer. |
| 147 // This API only supports subscription to accelerated composited frames. | 149 // This API only supports subscription to accelerated composited frames. |
| 148 void BeginFrameSubscription( | 150 void BeginFrameSubscription( |
| 149 int route_id, | 151 int route_id, |
| 150 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); | 152 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); |
| 151 void EndFrameSubscription(int route_id); | 153 void EndFrameSubscription(int route_id); |
| 152 | 154 |
| 155 GeolocationDispatcherHost* geolocation_dispatcher_host() { |
| 156 return geolocation_dispatcher_host_; |
| 157 } |
| 158 |
| 153 // Register/unregister the host identified by the host id in the global host | 159 // Register/unregister the host identified by the host id in the global host |
| 154 // list. | 160 // list. |
| 155 static void RegisterHost(int host_id, RenderProcessHost* host); | 161 static void RegisterHost(int host_id, RenderProcessHost* host); |
| 156 static void UnregisterHost(int host_id); | 162 static void UnregisterHost(int host_id); |
| 157 | 163 |
| 158 // Returns true if |host| is suitable for launching a new view with |site_url| | 164 // Returns true if |host| is suitable for launching a new view with |site_url| |
| 159 // in the given |browser_context|. | 165 // in the given |browser_context|. |
| 160 static bool IsSuitableHost(RenderProcessHost* host, | 166 static bool IsSuitableHost(RenderProcessHost* host, |
| 161 BrowserContext* browser_context, | 167 BrowserContext* browser_context, |
| 162 const GURL& site_url); | 168 const GURL& site_url); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 346 |
| 341 // Forwards power state messages to the renderer process. | 347 // Forwards power state messages to the renderer process. |
| 342 PowerMonitorMessageBroadcaster power_monitor_broadcaster_; | 348 PowerMonitorMessageBroadcaster power_monitor_broadcaster_; |
| 343 | 349 |
| 344 scoped_refptr<AudioRendererHost> audio_renderer_host_; | 350 scoped_refptr<AudioRendererHost> audio_renderer_host_; |
| 345 | 351 |
| 346 #if defined(OS_ANDROID) | 352 #if defined(OS_ANDROID) |
| 347 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; | 353 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; |
| 348 #endif | 354 #endif |
| 349 | 355 |
| 356 // Message filter for geolocation messages. |
| 357 GeolocationDispatcherHost* geolocation_dispatcher_host_; |
| 358 |
| 350 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 359 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 351 }; | 360 }; |
| 352 | 361 |
| 353 } // namespace content | 362 } // namespace content |
| 354 | 363 |
| 355 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 364 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |