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/power_monitor_message_broadcaster.h" | 17 #include "content/browser/power_monitor_message_broadcaster.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "content/public/browser/global_request_id.h" | |
20 #include "content/public/browser/gpu_data_manager_observer.h" | 19 #include "content/public/browser/gpu_data_manager_observer.h" |
21 #include "content/public/browser/render_process_host.h" | 20 #include "content/public/browser/render_process_host.h" |
22 #include "ipc/ipc_channel_proxy.h" | 21 #include "ipc/ipc_channel_proxy.h" |
23 #include "ui/surface/transport_dib.h" | 22 #include "ui/surface/transport_dib.h" |
24 | 23 |
25 class CommandLine; | 24 class CommandLine; |
26 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 25 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
27 | 26 |
28 namespace base { | 27 namespace base { |
29 class MessageLoop; | 28 class MessageLoop; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 virtual void RemovePendingView() OVERRIDE; | 110 virtual void RemovePendingView() OVERRIDE; |
112 virtual void SetSuddenTerminationAllowed(bool enabled) OVERRIDE; | 111 virtual void SetSuddenTerminationAllowed(bool enabled) OVERRIDE; |
113 virtual bool SuddenTerminationAllowed() const OVERRIDE; | 112 virtual bool SuddenTerminationAllowed() const OVERRIDE; |
114 virtual IPC::ChannelProxy* GetChannel() OVERRIDE; | 113 virtual IPC::ChannelProxy* GetChannel() OVERRIDE; |
115 virtual void AddFilter(BrowserMessageFilter* filter) OVERRIDE; | 114 virtual void AddFilter(BrowserMessageFilter* filter) OVERRIDE; |
116 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; | 115 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; |
117 virtual bool FastShutdownStarted() const OVERRIDE; | 116 virtual bool FastShutdownStarted() const OVERRIDE; |
118 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; | 117 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; |
119 virtual void SurfaceUpdated(int32 surface_id) OVERRIDE; | 118 virtual void SurfaceUpdated(int32 surface_id) OVERRIDE; |
120 virtual void ResumeRequestsForView(int route_id) OVERRIDE; | 119 virtual void ResumeRequestsForView(int route_id) OVERRIDE; |
| 120 virtual void ResumeDeferredNavigation( |
| 121 const GlobalRequestID& request_id) OVERRIDE; |
121 | 122 |
122 // IPC::Sender via RenderProcessHost. | 123 // IPC::Sender via RenderProcessHost. |
123 virtual bool Send(IPC::Message* msg) OVERRIDE; | 124 virtual bool Send(IPC::Message* msg) OVERRIDE; |
124 | 125 |
125 // IPC::Listener via RenderProcessHost. | 126 // IPC::Listener via RenderProcessHost. |
126 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 127 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
127 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 128 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
128 virtual void OnChannelError() OVERRIDE; | 129 virtual void OnChannelError() OVERRIDE; |
129 | 130 |
130 // ChildProcessLauncher::Client implementation. | 131 // ChildProcessLauncher::Client implementation. |
131 virtual void OnProcessLaunched() OVERRIDE; | 132 virtual void OnProcessLaunched() OVERRIDE; |
132 | 133 |
133 scoped_refptr<AudioRendererHost> audio_renderer_host() const; | 134 scoped_refptr<AudioRendererHost> audio_renderer_host() const; |
134 | 135 |
135 // Tells the ResourceDispatcherHost to resume a deferred navigation without | |
136 // transferring it to a new renderer process. | |
137 void ResumeDeferredNavigation(const GlobalRequestID& request_id); | |
138 | |
139 // Call this function when it is evident that the child process is actively | 136 // Call this function when it is evident that the child process is actively |
140 // performing some operation, for example if we just received an IPC message. | 137 // performing some operation, for example if we just received an IPC message. |
141 void mark_child_process_activity_time() { | 138 void mark_child_process_activity_time() { |
142 child_process_activity_time_ = base::TimeTicks::Now(); | 139 child_process_activity_time_ = base::TimeTicks::Now(); |
143 } | 140 } |
144 | 141 |
145 // Returns the current number of active views in this process. Excludes | 142 // Returns the current number of active views in this process. Excludes |
146 // any RenderViewHosts that are swapped out. | 143 // any RenderViewHosts that are swapped out. |
147 int GetActiveViewCount(); | 144 int GetActiveViewCount(); |
148 | 145 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 #if defined(OS_ANDROID) | 357 #if defined(OS_ANDROID) |
361 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; | 358 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; |
362 #endif | 359 #endif |
363 | 360 |
364 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 361 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
365 }; | 362 }; |
366 | 363 |
367 } // namespace content | 364 } // namespace content |
368 | 365 |
369 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 366 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |