| 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 <set> | 14 #include <set> |
| 15 #include <string> | 15 #include <string> |
| 16 | 16 |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| 20 #include "base/process/process.h" | 20 #include "base/process/process.h" |
| 21 #include "base/single_thread_task_runner.h" | 21 #include "base/single_thread_task_runner.h" |
| 22 #include "base/synchronization/waitable_event.h" | 22 #include "base/synchronization/waitable_event.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "content/browser/child_process_launcher.h" | 24 #include "content/browser/child_process_launcher.h" |
| 25 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 25 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 26 #include "content/browser/renderer_host/frame_sink_provider_impl.h" | 26 #include "content/browser/renderer_host/frame_sink_provider_impl.h" |
| 27 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" | 27 #include "content/browser/renderer_host/offscreen_canvas_provider_impl.h" |
| 28 #include "content/browser/webrtc/webrtc_eventlog_host.h" | 28 #include "content/browser/webrtc/webrtc_eventlog_host.h" |
| 29 #include "content/common/associated_interfaces.mojom.h" | 29 #include "content/common/associated_interfaces.mojom.h" |
| 30 #include "content/common/content_export.h" | 30 #include "content/common/content_export.h" |
| 31 #include "content/common/indexed_db/indexed_db.mojom.h" | 31 #include "content/common/indexed_db/indexed_db.mojom.h" |
| 32 #include "content/common/renderer.mojom.h" | 32 #include "content/common/renderer.mojom.h" |
| 33 #include "content/public/browser/render_process_host.h" | 33 #include "content/public/browser/render_process_host.h" |
| 34 #include "content/public/common/service_manager_connection.h" | 34 #include "content/public/common/service_manager_connection.h" |
| 35 #include "ipc/ipc_channel_proxy.h" | 35 #include "ipc/ipc_channel_proxy.h" |
| 36 #include "ipc/ipc_platform_file.h" | 36 #include "ipc/ipc_platform_file.h" |
| 37 #include "media/media_features.h" | 37 #include "media/media_features.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 void GetRoute( | 340 void GetRoute( |
| 341 int32_t routing_id, | 341 int32_t routing_id, |
| 342 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; | 342 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; |
| 343 | 343 |
| 344 // mojom::AssociatedInterfaceProvider: | 344 // mojom::AssociatedInterfaceProvider: |
| 345 void GetAssociatedInterface( | 345 void GetAssociatedInterface( |
| 346 const std::string& name, | 346 const std::string& name, |
| 347 mojom::AssociatedInterfaceAssociatedRequest request) override; | 347 mojom::AssociatedInterfaceAssociatedRequest request) override; |
| 348 | 348 |
| 349 void CreateMusGpuRequest(ui::mojom::GpuRequest request); | 349 void CreateMusGpuRequest(ui::mojom::GpuRequest request); |
| 350 void CreateOffscreenCanvasCompositorFrameSinkProvider( | 350 void CreateOffscreenCanvasProvider( |
| 351 blink::mojom::OffscreenCanvasCompositorFrameSinkProviderRequest request); | 351 blink::mojom::OffscreenCanvasProviderRequest request); |
| 352 void BindFrameSinkProvider(mojom::FrameSinkProviderRequest request); | 352 void BindFrameSinkProvider(mojom::FrameSinkProviderRequest request); |
| 353 void CreateStoragePartitionService( | 353 void CreateStoragePartitionService( |
| 354 mojo::InterfaceRequest<mojom::StoragePartitionService> request); | 354 mojo::InterfaceRequest<mojom::StoragePartitionService> request); |
| 355 | 355 |
| 356 // Control message handlers. | 356 // Control message handlers. |
| 357 void OnShutdownRequest(); | 357 void OnShutdownRequest(); |
| 358 void SuddenTerminationChanged(bool enabled); | 358 void SuddenTerminationChanged(bool enabled); |
| 359 void OnUserMetricsRecordAction(const std::string& action); | 359 void OnUserMetricsRecordAction(const std::string& action); |
| 360 void OnCloseACK(int old_route_id); | 360 void OnCloseACK(int old_route_id); |
| 361 | 361 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 // Luckily Android never performs a clean shutdown. So explicitly | 599 // Luckily Android never performs a clean shutdown. So explicitly |
| 600 // ignore this problem. | 600 // ignore this problem. |
| 601 base::WaitableEvent never_signaled_; | 601 base::WaitableEvent never_signaled_; |
| 602 #endif | 602 #endif |
| 603 | 603 |
| 604 scoped_refptr<ResourceMessageFilter> resource_message_filter_; | 604 scoped_refptr<ResourceMessageFilter> resource_message_filter_; |
| 605 std::unique_ptr<GpuClient, BrowserThread::DeleteOnIOThread> gpu_client_; | 605 std::unique_ptr<GpuClient, BrowserThread::DeleteOnIOThread> gpu_client_; |
| 606 std::unique_ptr<PushMessagingManager, BrowserThread::DeleteOnIOThread> | 606 std::unique_ptr<PushMessagingManager, BrowserThread::DeleteOnIOThread> |
| 607 push_messaging_manager_; | 607 push_messaging_manager_; |
| 608 | 608 |
| 609 std::unique_ptr<OffscreenCanvasCompositorFrameSinkProviderImpl> | 609 std::unique_ptr<OffscreenCanvasProviderImpl> offscreen_canvas_provider_; |
| 610 offscreen_canvas_provider_; | |
| 611 | 610 |
| 612 mojom::RouteProviderAssociatedPtr remote_route_provider_; | 611 mojom::RouteProviderAssociatedPtr remote_route_provider_; |
| 613 mojom::RendererAssociatedPtr renderer_interface_; | 612 mojom::RendererAssociatedPtr renderer_interface_; |
| 614 | 613 |
| 615 // Tracks active audio streams within the render process; used to determine if | 614 // Tracks active audio streams within the render process; used to determine if |
| 616 // if a process should be backgrounded. | 615 // if a process should be backgrounded. |
| 617 int audio_stream_count_ = 0; | 616 int audio_stream_count_ = 0; |
| 618 | 617 |
| 619 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend | 618 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend |
| 620 // WeakPtrs which are invalidated any time the RPHI is recycled. | 619 // WeakPtrs which are invalidated any time the RPHI is recycled. |
| 621 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> | 620 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> |
| 622 instance_weak_factory_; | 621 instance_weak_factory_; |
| 623 | 622 |
| 624 FrameSinkProviderImpl frame_sink_provider_; | 623 FrameSinkProviderImpl frame_sink_provider_; |
| 625 | 624 |
| 626 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 625 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 627 | 626 |
| 628 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 627 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 629 }; | 628 }; |
| 630 | 629 |
| 631 } // namespace content | 630 } // namespace content |
| 632 | 631 |
| 633 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 632 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |