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/power_monitor_message_broadcaster.h" | 17 #include "content/browser/power_monitor_message_broadcaster.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "content/public/browser/gpu_data_manager_observer.h" | 19 #include "content/public/browser/gpu_data_manager_observer.h" |
20 #include "content/public/browser/render_process_host.h" | 20 #include "content/public/browser/render_process_host.h" |
21 #include "ipc/ipc_channel_proxy.h" | 21 #include "ipc/ipc_channel_proxy.h" |
22 #include "ipc/ipc_platform_file.h" | 22 #include "ipc/ipc_platform_file.h" |
23 #include "mojo/public/cpp/bindings/interface_ptr.h" | 23 #include "mojo/public/cpp/bindings/interface_ptr.h" |
24 | 24 |
| 25 #if defined(OS_MACOSX) |
| 26 #include "base/mac/scoped_cftyperef.h" |
| 27 #endif |
| 28 |
25 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 29 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
26 | 30 |
27 namespace base { | 31 namespace base { |
28 class CommandLine; | 32 class CommandLine; |
29 class MessageLoop; | 33 class MessageLoop; |
30 } | 34 } |
31 | 35 |
32 namespace gfx { | 36 namespace gfx { |
33 class Size; | 37 class Size; |
| 38 struct GpuMemoryBufferHandle; |
34 } | 39 } |
35 | 40 |
36 namespace content { | 41 namespace content { |
37 class AudioRendererHost; | 42 class AudioRendererHost; |
38 class BrowserDemuxerAndroid; | 43 class BrowserDemuxerAndroid; |
39 class GpuMessageFilter; | 44 class GpuMessageFilter; |
40 class MessagePortMessageFilter; | 45 class MessagePortMessageFilter; |
41 class MojoApplicationHost; | 46 class MojoApplicationHost; |
42 #if defined(ENABLE_WEBRTC) | 47 #if defined(ENABLE_WEBRTC) |
43 class P2PSocketDispatcherHost; | 48 class P2PSocketDispatcherHost; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 void ProcessDied(bool already_dead); | 315 void ProcessDied(bool already_dead); |
311 | 316 |
312 virtual void OnGpuSwitching() OVERRIDE; | 317 virtual void OnGpuSwitching() OVERRIDE; |
313 | 318 |
314 #if defined(ENABLE_WEBRTC) | 319 #if defined(ENABLE_WEBRTC) |
315 // Sends |file_for_transit| to the render process. | 320 // Sends |file_for_transit| to the render process. |
316 void SendAecDumpFileToRenderer(IPC::PlatformFileForTransit file_for_transit); | 321 void SendAecDumpFileToRenderer(IPC::PlatformFileForTransit file_for_transit); |
317 void SendDisableAecDumpToRenderer(); | 322 void SendDisableAecDumpToRenderer(); |
318 #endif | 323 #endif |
319 | 324 |
| 325 // GpuMemoryBuffer allocation handler. |
| 326 void OnAllocateGpuMemoryBuffer(uint32 width, |
| 327 uint32 height, |
| 328 uint32 internalformat, |
| 329 uint32 usage, |
| 330 IPC::Message* reply); |
| 331 void GpuMemoryBufferAllocated(IPC::Message* reply, |
| 332 const gfx::GpuMemoryBufferHandle& handle); |
| 333 |
320 scoped_ptr<MojoApplicationHost> mojo_application_host_; | 334 scoped_ptr<MojoApplicationHost> mojo_application_host_; |
321 bool mojo_activation_required_; | 335 bool mojo_activation_required_; |
322 | 336 |
323 // The registered IPC listener objects. When this list is empty, we should | 337 // The registered IPC listener objects. When this list is empty, we should |
324 // delete ourselves. | 338 // delete ourselves. |
325 IDMap<IPC::Listener> listeners_; | 339 IDMap<IPC::Listener> listeners_; |
326 | 340 |
327 // The count of currently visible widgets. Since the host can be a container | 341 // The count of currently visible widgets. Since the host can be a container |
328 // for multiple widgets, it uses this count to determine when it should be | 342 // for multiple widgets, it uses this count to determine when it should be |
329 // backgrounded. | 343 // backgrounded. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // Message filter and dispatcher for screen orientation. | 443 // Message filter and dispatcher for screen orientation. |
430 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; | 444 ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_; |
431 | 445 |
432 int worker_ref_count_; | 446 int worker_ref_count_; |
433 | 447 |
434 // Records the time when the process starts surviving for workers for UMA. | 448 // Records the time when the process starts surviving for workers for UMA. |
435 base::TimeTicks survive_for_worker_start_time_; | 449 base::TimeTicks survive_for_worker_start_time_; |
436 | 450 |
437 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 451 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
438 | 452 |
| 453 #if defined(OS_MACOSX) |
| 454 base::ScopedCFTypeRef<CFTypeRef> last_io_surface_; |
| 455 #endif |
| 456 |
439 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 457 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
440 }; | 458 }; |
441 | 459 |
442 } // namespace content | 460 } // namespace content |
443 | 461 |
444 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 462 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |