| 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_provider_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_interface_registry_impl.h" |
| 29 #include "content/common/associated_interfaces.mojom.h" | 30 #include "content/common/associated_interfaces.mojom.h" |
| 30 #include "content/common/content_export.h" | 31 #include "content/common/content_export.h" |
| 31 #include "content/common/indexed_db/indexed_db.mojom.h" | 32 #include "content/common/indexed_db/indexed_db.mojom.h" |
| 32 #include "content/common/renderer.mojom.h" | 33 #include "content/common/renderer.mojom.h" |
| 33 #include "content/public/browser/render_process_host.h" | 34 #include "content/public/browser/render_process_host.h" |
| 34 #include "content/public/common/service_manager_connection.h" | 35 #include "content/public/common/service_manager_connection.h" |
| 35 #include "ipc/ipc_channel_proxy.h" | 36 #include "ipc/ipc_channel_proxy.h" |
| 36 #include "ipc/ipc_platform_file.h" | 37 #include "ipc/ipc_platform_file.h" |
| 37 #include "media/media_features.h" | 38 #include "media/media_features.h" |
| 38 #include "mojo/edk/embedder/pending_process_connection.h" | 39 #include "mojo/edk/embedder/pending_process_connection.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // mojom::RouteProvider: | 338 // mojom::RouteProvider: |
| 338 void GetRoute( | 339 void GetRoute( |
| 339 int32_t routing_id, | 340 int32_t routing_id, |
| 340 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; | 341 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; |
| 341 | 342 |
| 342 // mojom::AssociatedInterfaceProvider: | 343 // mojom::AssociatedInterfaceProvider: |
| 343 void GetAssociatedInterface( | 344 void GetAssociatedInterface( |
| 344 const std::string& name, | 345 const std::string& name, |
| 345 mojom::AssociatedInterfaceAssociatedRequest request) override; | 346 mojom::AssociatedInterfaceAssociatedRequest request) override; |
| 346 | 347 |
| 348 void BindRouteProvider(mojom::RouteProviderAssociatedRequest request); |
| 349 |
| 347 void CreateMusGpuRequest(ui::mojom::GpuRequest request); | 350 void CreateMusGpuRequest(ui::mojom::GpuRequest request); |
| 348 void CreateOffscreenCanvasProvider( | 351 void CreateOffscreenCanvasProvider( |
| 349 blink::mojom::OffscreenCanvasProviderRequest request); | 352 blink::mojom::OffscreenCanvasProviderRequest request); |
| 350 void BindFrameSinkProvider(mojom::FrameSinkProviderRequest request); | 353 void BindFrameSinkProvider(mojom::FrameSinkProviderRequest request); |
| 351 void CreateStoragePartitionService( | 354 void CreateStoragePartitionService( |
| 352 mojo::InterfaceRequest<mojom::StoragePartitionService> request); | 355 mojo::InterfaceRequest<mojom::StoragePartitionService> request); |
| 353 | 356 |
| 354 // Control message handlers. | 357 // Control message handlers. |
| 355 void OnShutdownRequest(); | 358 void OnShutdownRequest(); |
| 356 void SuddenTerminationChanged(bool enabled); | 359 void SuddenTerminationChanged(bool enabled); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 bool is_worker_ref_count_disabled_; | 454 bool is_worker_ref_count_disabled_; |
| 452 | 455 |
| 453 // Whether this host is never suitable for reuse as determined in the | 456 // Whether this host is never suitable for reuse as determined in the |
| 454 // MayReuseHost() function. | 457 // MayReuseHost() function. |
| 455 bool is_never_suitable_for_reuse_ = false; | 458 bool is_never_suitable_for_reuse_ = false; |
| 456 | 459 |
| 457 // The registered IPC listener objects. When this list is empty, we should | 460 // The registered IPC listener objects. When this list is empty, we should |
| 458 // delete ourselves. | 461 // delete ourselves. |
| 459 IDMap<IPC::Listener*> listeners_; | 462 IDMap<IPC::Listener*> listeners_; |
| 460 | 463 |
| 464 // Mojo interfaces provided to the child process are registered here if they |
| 465 // need consistent delivery ordering with legacy IPC, and are process-wide in |
| 466 // nature (e.g. metrics, memory usage). |
| 467 std::unique_ptr<AssociatedInterfaceRegistryImpl> associated_interfaces_; |
| 468 |
| 461 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; | 469 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; |
| 462 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider, int32_t> | 470 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider, int32_t> |
| 463 associated_interface_provider_bindings_; | 471 associated_interface_provider_bindings_; |
| 464 | 472 |
| 465 // The count of currently visible widgets. Since the host can be a container | 473 // The count of currently visible widgets. Since the host can be a container |
| 466 // for multiple widgets, it uses this count to determine when it should be | 474 // for multiple widgets, it uses this count to determine when it should be |
| 467 // backgrounded. | 475 // backgrounded. |
| 468 int32_t visible_widgets_; | 476 int32_t visible_widgets_; |
| 469 | 477 |
| 470 // The set of widgets in this RenderProcessHostImpl. | 478 // The set of widgets in this RenderProcessHostImpl. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 FrameSinkProviderImpl frame_sink_provider_; | 629 FrameSinkProviderImpl frame_sink_provider_; |
| 622 | 630 |
| 623 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 631 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 624 | 632 |
| 625 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 633 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 626 }; | 634 }; |
| 627 | 635 |
| 628 } // namespace content | 636 } // namespace content |
| 629 | 637 |
| 630 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 638 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |