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/power_monitor_message_broadcaster.h" | 25 #include "content/browser/power_monitor_message_broadcaster.h" |
26 #include "content/browser/webrtc/webrtc_eventlog_host.h" | 26 #include "content/browser/webrtc/webrtc_eventlog_host.h" |
27 #include "content/common/associated_interfaces.mojom.h" | 27 #include "content/common/associated_interfaces.mojom.h" |
28 #include "content/common/content_export.h" | 28 #include "content/common/content_export.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/mojo_shell_connection.h" | 31 #include "content/public/common/mojo_shell_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 "mojo/public/cpp/bindings/associated_binding.h" | 34 #include "mojo/public/cpp/bindings/associated_binding.h" |
34 #include "mojo/public/cpp/bindings/associated_binding_set.h" | 35 #include "mojo/public/cpp/bindings/associated_binding_set.h" |
35 #include "mojo/public/cpp/bindings/interface_ptr.h" | 36 #include "mojo/public/cpp/bindings/interface_ptr.h" |
36 #include "services/shell/public/cpp/interface_registry.h" | 37 #include "services/shell/public/cpp/interface_registry.h" |
37 #include "services/shell/public/interfaces/service.mojom.h" | 38 #include "services/shell/public/interfaces/service.mojom.h" |
38 #include "ui/gfx/gpu_memory_buffer.h" | 39 #include "ui/gfx/gpu_memory_buffer.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 bool IsProcessBackgrounded() const override; | 170 bool IsProcessBackgrounded() const override; |
170 void IncrementServiceWorkerRefCount() override; | 171 void IncrementServiceWorkerRefCount() override; |
171 void DecrementServiceWorkerRefCount() override; | 172 void DecrementServiceWorkerRefCount() override; |
172 void IncrementSharedWorkerRefCount() override; | 173 void IncrementSharedWorkerRefCount() override; |
173 void DecrementSharedWorkerRefCount() override; | 174 void DecrementSharedWorkerRefCount() override; |
174 void ForceReleaseWorkerRefCounts() override; | 175 void ForceReleaseWorkerRefCounts() override; |
175 bool IsWorkerRefCountDisabled() override; | 176 bool IsWorkerRefCountDisabled() override; |
176 void PurgeAndSuspend() override; | 177 void PurgeAndSuspend() override; |
177 | 178 |
178 mojom::RouteProvider* GetRemoteRouteProvider(); | 179 mojom::RouteProvider* GetRemoteRouteProvider(); |
| 180 mojom::Renderer* GetRendererInterface(); |
179 | 181 |
180 // IPC::Sender via RenderProcessHost. | 182 // IPC::Sender via RenderProcessHost. |
181 bool Send(IPC::Message* msg) override; | 183 bool Send(IPC::Message* msg) override; |
182 | 184 |
183 // IPC::Listener via RenderProcessHost. | 185 // IPC::Listener via RenderProcessHost. |
184 bool OnMessageReceived(const IPC::Message& msg) override; | 186 bool OnMessageReceived(const IPC::Message& msg) override; |
185 void OnChannelConnected(int32_t peer_pid) override; | 187 void OnChannelConnected(int32_t peer_pid) override; |
186 void OnChannelError() override; | 188 void OnChannelError() override; |
187 void OnBadMessageReceived(const IPC::Message& message) override; | 189 void OnBadMessageReceived(const IPC::Message& message) override; |
188 | 190 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 // Therefore a proper shutdown event to unblock the UI thread is not | 574 // Therefore a proper shutdown event to unblock the UI thread is not |
573 // possible without massive refactoring shutdown code. | 575 // possible without massive refactoring shutdown code. |
574 // Luckily Android never performs a clean shutdown. So explicitly | 576 // Luckily Android never performs a clean shutdown. So explicitly |
575 // ignore this problem. | 577 // ignore this problem. |
576 base::WaitableEvent never_signaled_; | 578 base::WaitableEvent never_signaled_; |
577 #endif | 579 #endif |
578 | 580 |
579 scoped_refptr<ResourceMessageFilter> resource_message_filter_; | 581 scoped_refptr<ResourceMessageFilter> resource_message_filter_; |
580 | 582 |
581 mojom::RouteProviderAssociatedPtr remote_route_provider_; | 583 mojom::RouteProviderAssociatedPtr remote_route_provider_; |
| 584 mojom::RendererAssociatedPtr renderer_interface_; |
582 | 585 |
583 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend | 586 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend |
584 // WeakPtrs which are invalidated any time the RPHI is recycled. | 587 // WeakPtrs which are invalidated any time the RPHI is recycled. |
585 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> | 588 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> |
586 instance_weak_factory_; | 589 instance_weak_factory_; |
587 | 590 |
588 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 591 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
589 | 592 |
590 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 593 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
591 }; | 594 }; |
592 | 595 |
593 } // namespace content | 596 } // namespace content |
594 | 597 |
595 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 598 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |