| 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_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <queue> | 13 #include <queue> |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "base/process/process.h" | 19 #include "base/process/process.h" |
| 20 #include "base/single_thread_task_runner.h" | 20 #include "base/single_thread_task_runner.h" |
| 21 #include "base/synchronization/waitable_event.h" | 21 #include "base/synchronization/waitable_event.h" |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "content/browser/child_process_launcher.h" | 23 #include "content/browser/child_process_launcher.h" |
| 24 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 24 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 25 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" |
| 25 #include "content/browser/webrtc/webrtc_eventlog_host.h" | 26 #include "content/browser/webrtc/webrtc_eventlog_host.h" |
| 26 #include "content/common/associated_interfaces.mojom.h" | 27 #include "content/common/associated_interfaces.mojom.h" |
| 27 #include "content/common/content_export.h" | 28 #include "content/common/content_export.h" |
| 28 #include "content/common/renderer.mojom.h" | 29 #include "content/common/renderer.mojom.h" |
| 29 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
| 30 #include "content/public/common/service_manager_connection.h" | 31 #include "content/public/common/service_manager_connection.h" |
| 31 #include "ipc/ipc_channel_proxy.h" | 32 #include "ipc/ipc_channel_proxy.h" |
| 32 #include "ipc/ipc_platform_file.h" | 33 #include "ipc/ipc_platform_file.h" |
| 33 #include "media/media_features.h" | 34 #include "media/media_features.h" |
| 34 #include "mojo/public/cpp/bindings/associated_binding.h" | 35 #include "mojo/public/cpp/bindings/associated_binding.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 void GetRoute( | 324 void GetRoute( |
| 324 int32_t routing_id, | 325 int32_t routing_id, |
| 325 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; | 326 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; |
| 326 | 327 |
| 327 // mojom::AssociatedInterfaceProvider: | 328 // mojom::AssociatedInterfaceProvider: |
| 328 void GetAssociatedInterface( | 329 void GetAssociatedInterface( |
| 329 const std::string& name, | 330 const std::string& name, |
| 330 mojom::AssociatedInterfaceAssociatedRequest request) override; | 331 mojom::AssociatedInterfaceAssociatedRequest request) override; |
| 331 | 332 |
| 332 void CreateMusGpuRequest(ui::mojom::GpuRequest request); | 333 void CreateMusGpuRequest(ui::mojom::GpuRequest request); |
| 334 void CreateOffscreenCanvasCompositorFrameSinkProvider( |
| 335 blink::mojom::OffscreenCanvasCompositorFrameSinkProviderRequest request); |
| 333 void CreateStoragePartitionService( | 336 void CreateStoragePartitionService( |
| 334 mojo::InterfaceRequest<mojom::StoragePartitionService> request); | 337 mojo::InterfaceRequest<mojom::StoragePartitionService> request); |
| 335 | 338 |
| 336 // Control message handlers. | 339 // Control message handlers. |
| 337 void OnShutdownRequest(); | 340 void OnShutdownRequest(); |
| 338 void SuddenTerminationChanged(bool enabled); | 341 void SuddenTerminationChanged(bool enabled); |
| 339 void OnUserMetricsRecordAction(const std::string& action); | 342 void OnUserMetricsRecordAction(const std::string& action); |
| 340 void OnCloseACK(int old_route_id); | 343 void OnCloseACK(int old_route_id); |
| 341 | 344 |
| 342 // Generates a command line to be used to spawn a renderer and appends the | 345 // Generates a command line to be used to spawn a renderer and appends the |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 // Therefore a proper shutdown event to unblock the UI thread is not | 575 // Therefore a proper shutdown event to unblock the UI thread is not |
| 573 // possible without massive refactoring shutdown code. | 576 // possible without massive refactoring shutdown code. |
| 574 // Luckily Android never performs a clean shutdown. So explicitly | 577 // Luckily Android never performs a clean shutdown. So explicitly |
| 575 // ignore this problem. | 578 // ignore this problem. |
| 576 base::WaitableEvent never_signaled_; | 579 base::WaitableEvent never_signaled_; |
| 577 #endif | 580 #endif |
| 578 | 581 |
| 579 scoped_refptr<ResourceMessageFilter> resource_message_filter_; | 582 scoped_refptr<ResourceMessageFilter> resource_message_filter_; |
| 580 std::unique_ptr<GpuClient, BrowserThread::DeleteOnIOThread> gpu_client_; | 583 std::unique_ptr<GpuClient, BrowserThread::DeleteOnIOThread> gpu_client_; |
| 581 | 584 |
| 585 std::unique_ptr<OffscreenCanvasCompositorFrameSinkProviderImpl> |
| 586 offscreen_canvas_provider_; |
| 587 |
| 582 mojom::RouteProviderAssociatedPtr remote_route_provider_; | 588 mojom::RouteProviderAssociatedPtr remote_route_provider_; |
| 583 mojom::RendererAssociatedPtr renderer_interface_; | 589 mojom::RendererAssociatedPtr renderer_interface_; |
| 584 | 590 |
| 585 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend | 591 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend |
| 586 // WeakPtrs which are invalidated any time the RPHI is recycled. | 592 // WeakPtrs which are invalidated any time the RPHI is recycled. |
| 587 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> | 593 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> |
| 588 instance_weak_factory_; | 594 instance_weak_factory_; |
| 589 | 595 |
| 590 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 596 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 591 | 597 |
| 592 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 598 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 593 }; | 599 }; |
| 594 | 600 |
| 595 } // namespace content | 601 } // namespace content |
| 596 | 602 |
| 597 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 603 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |