Chromium Code Reviews| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 // mojom::RouteProvider: | 340 // mojom::RouteProvider: |
| 340 void GetRoute( | 341 void GetRoute( |
| 341 int32_t routing_id, | 342 int32_t routing_id, |
| 342 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; | 343 mojom::AssociatedInterfaceProviderAssociatedRequest request) override; |
| 343 | 344 |
| 344 // mojom::AssociatedInterfaceProvider: | 345 // mojom::AssociatedInterfaceProvider: |
| 345 void GetAssociatedInterface( | 346 void GetAssociatedInterface( |
| 346 const std::string& name, | 347 const std::string& name, |
| 347 mojom::AssociatedInterfaceAssociatedRequest request) override; | 348 mojom::AssociatedInterfaceAssociatedRequest request) override; |
| 348 | 349 |
| 350 void BindRouteProvider(mojom::RouteProviderAssociatedRequest request); | |
| 351 | |
| 349 void CreateMusGpuRequest(ui::mojom::GpuRequest request); | 352 void CreateMusGpuRequest(ui::mojom::GpuRequest request); |
| 350 void CreateOffscreenCanvasProvider( | 353 void CreateOffscreenCanvasProvider( |
| 351 blink::mojom::OffscreenCanvasProviderRequest request); | 354 blink::mojom::OffscreenCanvasProviderRequest request); |
| 352 void BindFrameSinkProvider(mojom::FrameSinkProviderRequest request); | 355 void BindFrameSinkProvider(mojom::FrameSinkProviderRequest request); |
| 353 void CreateStoragePartitionService( | 356 void CreateStoragePartitionService( |
| 354 mojo::InterfaceRequest<mojom::StoragePartitionService> request); | 357 mojo::InterfaceRequest<mojom::StoragePartitionService> request); |
| 355 | 358 |
| 356 // Control message handlers. | 359 // Control message handlers. |
| 357 void OnShutdownRequest(); | 360 void OnShutdownRequest(); |
| 358 void SuddenTerminationChanged(bool enabled); | 361 void SuddenTerminationChanged(bool enabled); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 bool is_worker_ref_count_disabled_; | 456 bool is_worker_ref_count_disabled_; |
| 454 | 457 |
| 455 // Whether this host is never suitable for reuse as determined in the | 458 // Whether this host is never suitable for reuse as determined in the |
| 456 // MayReuseHost() function. | 459 // MayReuseHost() function. |
| 457 bool is_never_suitable_for_reuse_ = false; | 460 bool is_never_suitable_for_reuse_ = false; |
| 458 | 461 |
| 459 // The registered IPC listener objects. When this list is empty, we should | 462 // The registered IPC listener objects. When this list is empty, we should |
| 460 // delete ourselves. | 463 // delete ourselves. |
| 461 IDMap<IPC::Listener*> listeners_; | 464 IDMap<IPC::Listener*> listeners_; |
| 462 | 465 |
| 466 std::unique_ptr<AssociatedInterfaceRegistryImpl> associated_registry_; | |
|
Ken Rockot(use gerrit already)
2017/04/20 15:49:42
nit: associated_interfaces_?
nigeltao1
2017/04/21 00:07:54
Done.
| |
| 467 | |
| 463 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; | 468 mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; |
| 464 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider, int32_t> | 469 mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider, int32_t> |
| 465 associated_interface_provider_bindings_; | 470 associated_interface_provider_bindings_; |
| 466 | 471 |
| 467 // The count of currently visible widgets. Since the host can be a container | 472 // The count of currently visible widgets. Since the host can be a container |
| 468 // for multiple widgets, it uses this count to determine when it should be | 473 // for multiple widgets, it uses this count to determine when it should be |
| 469 // backgrounded. | 474 // backgrounded. |
| 470 int32_t visible_widgets_; | 475 int32_t visible_widgets_; |
| 471 | 476 |
| 472 // The set of widgets in this RenderProcessHostImpl. | 477 // The set of widgets in this RenderProcessHostImpl. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 623 FrameSinkProviderImpl frame_sink_provider_; | 628 FrameSinkProviderImpl frame_sink_provider_; |
| 624 | 629 |
| 625 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 630 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 626 | 631 |
| 627 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 632 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 628 }; | 633 }; |
| 629 | 634 |
| 630 } // namespace content | 635 } // namespace content |
| 631 | 636 |
| 632 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 637 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |