OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // are correlated with IDs. This way, the Views and the corresponding ViewHosts | 54 // are correlated with IDs. This way, the Views and the corresponding ViewHosts |
55 // communicate through the two process objects. | 55 // communicate through the two process objects. |
56 class BrowserRenderProcessHost : public RenderProcessHost, | 56 class BrowserRenderProcessHost : public RenderProcessHost, |
57 public NotificationObserver, | 57 public NotificationObserver, |
58 public ChildProcessLauncher::Client { | 58 public ChildProcessLauncher::Client { |
59 public: | 59 public: |
60 explicit BrowserRenderProcessHost(Profile* profile); | 60 explicit BrowserRenderProcessHost(Profile* profile); |
61 ~BrowserRenderProcessHost(); | 61 ~BrowserRenderProcessHost(); |
62 | 62 |
63 // RenderProcessHost implementation (public portion). | 63 // RenderProcessHost implementation (public portion). |
64 virtual bool Init(bool is_extensions_process); | 64 virtual bool Init(bool is_accessibility_enabled, bool is_extensions_process); |
65 virtual int GetNextRoutingID(); | 65 virtual int GetNextRoutingID(); |
66 virtual void CancelResourceRequests(int render_widget_id); | 66 virtual void CancelResourceRequests(int render_widget_id); |
67 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); | 67 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); |
68 virtual bool WaitForUpdateMsg(int render_widget_id, | 68 virtual bool WaitForUpdateMsg(int render_widget_id, |
69 const base::TimeDelta& max_delay, | 69 const base::TimeDelta& max_delay, |
70 IPC::Message* msg); | 70 IPC::Message* msg); |
71 virtual void ReceivedBadMessage(uint32 msg_type); | 71 virtual void ReceivedBadMessage(uint32 msg_type); |
72 virtual void WidgetRestored(); | 72 virtual void WidgetRestored(); |
73 virtual void WidgetHidden(); | 73 virtual void WidgetHidden(); |
74 virtual void ViewCreated(); | 74 virtual void ViewCreated(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 void ClearTransportDIBCache(); | 191 void ClearTransportDIBCache(); |
192 // This is used to clear our cache five seconds after the last use. | 192 // This is used to clear our cache five seconds after the last use. |
193 base::DelayTimer<BrowserRenderProcessHost> cached_dibs_cleaner_; | 193 base::DelayTimer<BrowserRenderProcessHost> cached_dibs_cleaner_; |
194 | 194 |
195 // Used in single-process mode. | 195 // Used in single-process mode. |
196 scoped_ptr<RendererMainThread> in_process_renderer_; | 196 scoped_ptr<RendererMainThread> in_process_renderer_; |
197 | 197 |
198 // Buffer visited links and send them to to renderer. | 198 // Buffer visited links and send them to to renderer. |
199 scoped_ptr<VisitedLinkUpdater> visited_link_updater_; | 199 scoped_ptr<VisitedLinkUpdater> visited_link_updater_; |
200 | 200 |
| 201 // True if this prcoess should have accessibility enabled; |
| 202 bool accessibility_enabled_; |
| 203 |
201 // True iff this process is being used as an extension process. Not valid | 204 // True iff this process is being used as an extension process. Not valid |
202 // when running in single-process mode. | 205 // when running in single-process mode. |
203 bool extension_process_; | 206 bool extension_process_; |
204 | 207 |
205 // Usedt to launch and terminate the process without blocking the UI thread. | 208 // Usedt to launch and terminate the process without blocking the UI thread. |
206 scoped_ptr<ChildProcessLauncher> child_process_; | 209 scoped_ptr<ChildProcessLauncher> child_process_; |
207 | 210 |
208 // Messages we queue while waiting for the process handle. We queue them here | 211 // Messages we queue while waiting for the process handle. We queue them here |
209 // instead of in the channel so that we ensure they're sent after init related | 212 // instead of in the channel so that we ensure they're sent after init related |
210 // messages that are sent once the process handle is available. This is | 213 // messages that are sent once the process handle is available. This is |
211 // because the queued messages may have dependencies on the init messages. | 214 // because the queued messages may have dependencies on the init messages. |
212 std::queue<IPC::Message*> queued_messages_; | 215 std::queue<IPC::Message*> queued_messages_; |
213 | 216 |
214 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); | 217 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); |
215 }; | 218 }; |
216 | 219 |
217 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 220 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |