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_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "content/browser/child_process_launcher.h" | 16 #include "content/browser/child_process_launcher.h" |
17 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 17 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
18 #include "content/browser/power_monitor_message_broadcaster.h" | 18 #include "content/browser/power_monitor_message_broadcaster.h" |
19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
20 #include "content/public/browser/global_request_id.h" | |
21 #include "content/public/browser/gpu_data_manager_observer.h" | 20 #include "content/public/browser/gpu_data_manager_observer.h" |
22 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
23 #include "ipc/ipc_channel_proxy.h" | 22 #include "ipc/ipc_channel_proxy.h" |
24 #include "ipc/ipc_platform_file.h" | 23 #include "ipc/ipc_platform_file.h" |
25 #include "ui/surface/transport_dib.h" | 24 #include "ui/surface/transport_dib.h" |
26 | 25 |
27 class CommandLine; | 26 class CommandLine; |
28 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 27 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
29 | 28 |
30 namespace base { | 29 namespace base { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 virtual bool FastShutdownStarted() const OVERRIDE; | 119 virtual bool FastShutdownStarted() const OVERRIDE; |
121 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; | 120 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; |
122 virtual void ResumeRequestsForView(int route_id) OVERRIDE; | 121 virtual void ResumeRequestsForView(int route_id) OVERRIDE; |
123 virtual void FilterURL(bool empty_allowed, GURL* url) OVERRIDE; | 122 virtual void FilterURL(bool empty_allowed, GURL* url) OVERRIDE; |
124 #if defined(ENABLE_WEBRTC) | 123 #if defined(ENABLE_WEBRTC) |
125 virtual void EnableAecDump(const base::FilePath& file) OVERRIDE; | 124 virtual void EnableAecDump(const base::FilePath& file) OVERRIDE; |
126 virtual void DisableAecDump() OVERRIDE; | 125 virtual void DisableAecDump() OVERRIDE; |
127 virtual void SetWebRtcLogMessageCallback( | 126 virtual void SetWebRtcLogMessageCallback( |
128 base::Callback<void(const std::string&)> callback) OVERRIDE; | 127 base::Callback<void(const std::string&)> callback) OVERRIDE; |
129 #endif | 128 #endif |
| 129 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) |
| 130 OVERRIDE; |
130 | 131 |
131 // IPC::Sender via RenderProcessHost. | 132 // IPC::Sender via RenderProcessHost. |
132 virtual bool Send(IPC::Message* msg) OVERRIDE; | 133 virtual bool Send(IPC::Message* msg) OVERRIDE; |
133 | 134 |
134 // IPC::Listener via RenderProcessHost. | 135 // IPC::Listener via RenderProcessHost. |
135 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 136 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
136 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 137 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
137 virtual void OnChannelError() OVERRIDE; | 138 virtual void OnChannelError() OVERRIDE; |
138 | 139 |
139 // ChildProcessLauncher::Client implementation. | 140 // ChildProcessLauncher::Client implementation. |
140 virtual void OnProcessLaunched() OVERRIDE; | 141 virtual void OnProcessLaunched() OVERRIDE; |
141 | 142 |
142 scoped_refptr<AudioRendererHost> audio_renderer_host() const; | 143 scoped_refptr<AudioRendererHost> audio_renderer_host() const; |
143 | 144 |
144 // Tells the ResourceDispatcherHost to resume a deferred navigation without | |
145 // transferring it to a new renderer process. | |
146 void ResumeDeferredNavigation(const GlobalRequestID& request_id); | |
147 | |
148 // Call this function when it is evident that the child process is actively | 145 // Call this function when it is evident that the child process is actively |
149 // performing some operation, for example if we just received an IPC message. | 146 // performing some operation, for example if we just received an IPC message. |
150 void mark_child_process_activity_time() { | 147 void mark_child_process_activity_time() { |
151 child_process_activity_time_ = base::TimeTicks::Now(); | 148 child_process_activity_time_ = base::TimeTicks::Now(); |
152 } | 149 } |
153 | 150 |
154 // Returns the current number of active views in this process. Excludes | 151 // Returns the current number of active views in this process. Excludes |
155 // any RenderViewHosts that are swapped out. | 152 // any RenderViewHosts that are swapped out. |
156 int GetActiveViewCount(); | 153 int GetActiveViewCount(); |
157 | 154 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 399 |
403 // Lives on the browser's ChildThread. | 400 // Lives on the browser's ChildThread. |
404 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 401 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
405 | 402 |
406 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 403 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
407 }; | 404 }; |
408 | 405 |
409 } // namespace content | 406 } // namespace content |
410 | 407 |
411 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 408 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |