| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class CONTENT_EXPORT RenderProcessHostImpl | 51 class CONTENT_EXPORT RenderProcessHostImpl |
| 52 : public content::RenderProcessHost, | 52 : public content::RenderProcessHost, |
| 53 public ChildProcessLauncher::Client, | 53 public ChildProcessLauncher::Client, |
| 54 public base::WaitableEventWatcher::Delegate { | 54 public base::WaitableEventWatcher::Delegate { |
| 55 public: | 55 public: |
| 56 explicit RenderProcessHostImpl(content::BrowserContext* browser_context); | 56 explicit RenderProcessHostImpl(content::BrowserContext* browser_context); |
| 57 virtual ~RenderProcessHostImpl(); | 57 virtual ~RenderProcessHostImpl(); |
| 58 | 58 |
| 59 // RenderProcessHost implementation (public portion). | 59 // RenderProcessHost implementation (public portion). |
| 60 virtual void EnableSendQueue() OVERRIDE; | 60 virtual void EnableSendQueue() OVERRIDE; |
| 61 virtual bool Init(bool is_accessibility_enabled) OVERRIDE; | 61 virtual bool Init() OVERRIDE; |
| 62 virtual int GetNextRoutingID() OVERRIDE; | 62 virtual int GetNextRoutingID() OVERRIDE; |
| 63 virtual void CancelResourceRequests(int render_widget_id) OVERRIDE; | 63 virtual void CancelResourceRequests(int render_widget_id) OVERRIDE; |
| 64 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params) | 64 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params) |
| 65 OVERRIDE; | 65 OVERRIDE; |
| 66 virtual bool WaitForUpdateMsg(int render_widget_id, | 66 virtual bool WaitForUpdateMsg(int render_widget_id, |
| 67 const base::TimeDelta& max_delay, | 67 const base::TimeDelta& max_delay, |
| 68 IPC::Message* msg) OVERRIDE; | 68 IPC::Message* msg) OVERRIDE; |
| 69 virtual void ReceivedBadMessage() OVERRIDE; | 69 virtual void ReceivedBadMessage() OVERRIDE; |
| 70 virtual void WidgetRestored() OVERRIDE; | 70 virtual void WidgetRestored() OVERRIDE; |
| 71 virtual void WidgetHidden() OVERRIDE; | 71 virtual void WidgetHidden() OVERRIDE; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // Map a transport DIB from its Id and return it. Returns NULL on error. | 213 // Map a transport DIB from its Id and return it. Returns NULL on error. |
| 214 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); | 214 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); |
| 215 | 215 |
| 216 void ClearTransportDIBCache(); | 216 void ClearTransportDIBCache(); |
| 217 // This is used to clear our cache five seconds after the last use. | 217 // This is used to clear our cache five seconds after the last use. |
| 218 base::DelayTimer<RenderProcessHostImpl> cached_dibs_cleaner_; | 218 base::DelayTimer<RenderProcessHostImpl> cached_dibs_cleaner_; |
| 219 | 219 |
| 220 // Used in single-process mode. | 220 // Used in single-process mode. |
| 221 scoped_ptr<RendererMainThread> in_process_renderer_; | 221 scoped_ptr<RendererMainThread> in_process_renderer_; |
| 222 | 222 |
| 223 // True if this prcoess should have accessibility enabled; | |
| 224 bool accessibility_enabled_; | |
| 225 | |
| 226 // True after Init() has been called. We can't just check channel_ because we | 223 // True after Init() has been called. We can't just check channel_ because we |
| 227 // also reset that in the case of process termination. | 224 // also reset that in the case of process termination. |
| 228 bool is_initialized_; | 225 bool is_initialized_; |
| 229 | 226 |
| 230 // Used to launch and terminate the process without blocking the UI thread. | 227 // Used to launch and terminate the process without blocking the UI thread. |
| 231 scoped_ptr<ChildProcessLauncher> child_process_launcher_; | 228 scoped_ptr<ChildProcessLauncher> child_process_launcher_; |
| 232 | 229 |
| 233 // Messages we queue while waiting for the process handle. We queue them here | 230 // Messages we queue while waiting for the process handle. We queue them here |
| 234 // instead of in the channel so that we ensure they're sent after init related | 231 // instead of in the channel so that we ensure they're sent after init related |
| 235 // messages that are sent once the process handle is available. This is | 232 // messages that are sent once the process handle is available. This is |
| (...skipping 22 matching lines...) Expand all Loading... |
| 258 // filtering for this at the render widget level. | 255 // filtering for this at the render widget level. |
| 259 bool ignore_input_events_; | 256 bool ignore_input_events_; |
| 260 | 257 |
| 261 // Records the last time we regarded the child process active. | 258 // Records the last time we regarded the child process active. |
| 262 base::TimeTicks child_process_activity_time_; | 259 base::TimeTicks child_process_activity_time_; |
| 263 | 260 |
| 264 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 261 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 265 }; | 262 }; |
| 266 | 263 |
| 267 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 264 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |