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/process.h" | 13 #include "base/process.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "base/timer.h" | 15 #include "base/timer.h" |
16 #include "content/browser/child_process_launcher.h" | 16 #include "content/browser/child_process_launcher.h" |
17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/public/browser/global_request_id.h" |
18 #include "content/public/browser/gpu_data_manager_observer.h" | 19 #include "content/public/browser/gpu_data_manager_observer.h" |
19 #include "content/public/browser/render_process_host.h" | 20 #include "content/public/browser/render_process_host.h" |
20 #include "ipc/ipc_channel_proxy.h" | 21 #include "ipc/ipc_channel_proxy.h" |
21 #include "ui/surface/transport_dib.h" | 22 #include "ui/surface/transport_dib.h" |
22 | 23 |
23 class CommandLine; | 24 class CommandLine; |
24 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | 25 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; |
25 | 26 |
26 namespace base { | 27 namespace base { |
27 class MessageLoop; | 28 class MessageLoop; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 RenderProcessHostImpl(BrowserContext* browser_context, | 70 RenderProcessHostImpl(BrowserContext* browser_context, |
70 StoragePartitionImpl* storage_partition_impl, | 71 StoragePartitionImpl* storage_partition_impl, |
71 bool supports_browser_plugin, | 72 bool supports_browser_plugin, |
72 bool is_guest); | 73 bool is_guest); |
73 virtual ~RenderProcessHostImpl(); | 74 virtual ~RenderProcessHostImpl(); |
74 | 75 |
75 // RenderProcessHost implementation (public portion). | 76 // RenderProcessHost implementation (public portion). |
76 virtual void EnableSendQueue() OVERRIDE; | 77 virtual void EnableSendQueue() OVERRIDE; |
77 virtual bool Init() OVERRIDE; | 78 virtual bool Init() OVERRIDE; |
78 virtual int GetNextRoutingID() OVERRIDE; | 79 virtual int GetNextRoutingID() OVERRIDE; |
79 virtual void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params) | |
80 OVERRIDE; | |
81 virtual bool WaitForBackingStoreMsg(int render_widget_id, | 80 virtual bool WaitForBackingStoreMsg(int render_widget_id, |
82 const base::TimeDelta& max_delay, | 81 const base::TimeDelta& max_delay, |
83 IPC::Message* msg) OVERRIDE; | 82 IPC::Message* msg) OVERRIDE; |
84 virtual void ReceivedBadMessage() OVERRIDE; | 83 virtual void ReceivedBadMessage() OVERRIDE; |
85 virtual void WidgetRestored() OVERRIDE; | 84 virtual void WidgetRestored() OVERRIDE; |
86 virtual void WidgetHidden() OVERRIDE; | 85 virtual void WidgetHidden() OVERRIDE; |
87 virtual int VisibleWidgetCount() const OVERRIDE; | 86 virtual int VisibleWidgetCount() const OVERRIDE; |
88 virtual bool IsGuest() const OVERRIDE; | 87 virtual bool IsGuest() const OVERRIDE; |
89 virtual StoragePartition* GetStoragePartition() const OVERRIDE; | 88 virtual StoragePartition* GetStoragePartition() const OVERRIDE; |
90 virtual bool FastShutdownIfPossible() OVERRIDE; | 89 virtual bool FastShutdownIfPossible() OVERRIDE; |
(...skipping 30 matching lines...) Expand all Loading... |
121 virtual bool Send(IPC::Message* msg) OVERRIDE; | 120 virtual bool Send(IPC::Message* msg) OVERRIDE; |
122 | 121 |
123 // IPC::Listener via RenderProcessHost. | 122 // IPC::Listener via RenderProcessHost. |
124 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 123 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
125 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 124 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
126 virtual void OnChannelError() OVERRIDE; | 125 virtual void OnChannelError() OVERRIDE; |
127 | 126 |
128 // ChildProcessLauncher::Client implementation. | 127 // ChildProcessLauncher::Client implementation. |
129 virtual void OnProcessLaunched() OVERRIDE; | 128 virtual void OnProcessLaunched() OVERRIDE; |
130 | 129 |
| 130 // Tells the ResourceDispatcherHost to resume a deferred navigation without |
| 131 // transferring it to a new renderer process. |
| 132 void ResumeDeferredNavigation(const GlobalRequestID& request_id); |
| 133 |
131 // Call this function when it is evident that the child process is actively | 134 // Call this function when it is evident that the child process is actively |
132 // performing some operation, for example if we just received an IPC message. | 135 // performing some operation, for example if we just received an IPC message. |
133 void mark_child_process_activity_time() { | 136 void mark_child_process_activity_time() { |
134 child_process_activity_time_ = base::TimeTicks::Now(); | 137 child_process_activity_time_ = base::TimeTicks::Now(); |
135 } | 138 } |
136 | 139 |
137 // Returns the current number of active views in this process. Excludes | 140 // Returns the current number of active views in this process. Excludes |
138 // any RenderViewHosts that are swapped out. | 141 // any RenderViewHosts that are swapped out. |
139 int GetActiveViewCount(); | 142 int GetActiveViewCount(); |
140 | 143 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // Prevents the class from being added as a GpuDataManagerImpl observer more | 337 // Prevents the class from being added as a GpuDataManagerImpl observer more |
335 // than once. | 338 // than once. |
336 bool gpu_observer_registered_; | 339 bool gpu_observer_registered_; |
337 | 340 |
338 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 341 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
339 }; | 342 }; |
340 | 343 |
341 } // namespace content | 344 } // namespace content |
342 | 345 |
343 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 346 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |