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_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_RENDER_THREAD_H_ |
6 #define CHROME_RENDERER_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_RENDER_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "base/timer.h" | 16 #include "base/timer.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "chrome/common/extensions/extension_set.h" | |
19 #include "chrome/renderer/chrome_content_renderer_client.h" | 18 #include "chrome/renderer/chrome_content_renderer_client.h" |
20 #include "chrome/renderer/visitedlink_slave.h" | 19 #include "chrome/renderer/visitedlink_slave.h" |
21 #include "content/common/child_thread.h" | 20 #include "content/common/child_thread.h" |
22 #include "content/common/css_colors.h" | 21 #include "content/common/css_colors.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/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
26 | 25 |
27 class AppCacheDispatcher; | 26 class AppCacheDispatcher; |
28 class CookieMessageFilter; | 27 class CookieMessageFilter; |
29 class DBMessageFilter; | 28 class DBMessageFilter; |
30 class DevToolsAgentFilter; | 29 class DevToolsAgentFilter; |
31 class ExtensionSet; | |
32 class FilePath; | 30 class FilePath; |
33 class GpuChannelHost; | 31 class GpuChannelHost; |
34 class IndexedDBDispatcher; | 32 class IndexedDBDispatcher; |
35 class ListValue; | |
36 class RendererHistogram; | 33 class RendererHistogram; |
37 class RendererHistogramSnapshots; | 34 class RendererHistogramSnapshots; |
38 class RenderProcessObserver; | 35 class RenderProcessObserver; |
39 class RendererNetPredictor; | 36 class RendererNetPredictor; |
40 class RendererWebKitClientImpl; | 37 class RendererWebKitClientImpl; |
41 class SpellCheck; | 38 class SpellCheck; |
42 class SkBitmap; | 39 class SkBitmap; |
43 class UserScriptSlave; | |
44 class URLPattern; | |
45 class WebDatabaseObserverImpl; | 40 class WebDatabaseObserverImpl; |
46 | 41 |
47 struct ContentSettings; | 42 struct ContentSettings; |
48 struct RendererPreferences; | 43 struct RendererPreferences; |
49 struct DOMStorageMsg_Event_Params; | 44 struct DOMStorageMsg_Event_Params; |
50 struct GPUInfo; | 45 struct GPUInfo; |
51 struct ExtensionMsg_Loaded_Params; | |
52 struct ViewMsg_New_Params; | 46 struct ViewMsg_New_Params; |
53 struct WebPreferences; | 47 struct WebPreferences; |
54 | 48 |
55 namespace base { | 49 namespace base { |
56 class MessageLoopProxy; | 50 class MessageLoopProxy; |
57 class Thread; | 51 class Thread; |
58 } | 52 } |
59 | 53 |
60 namespace IPC { | 54 namespace IPC { |
61 struct ChannelHandle; | 55 struct ChannelHandle; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // browser process. These need the ::current() paradigm. So instead, we should | 90 // browser process. These need the ::current() paradigm. So instead, we should |
97 // probably remove the render_thread_ parameter to RenderView/Widget in | 91 // probably remove the render_thread_ parameter to RenderView/Widget in |
98 // preference to just getting the global singleton. We can make it easier to | 92 // preference to just getting the global singleton. We can make it easier to |
99 // understand by moving everything to the abstract interface and saying that | 93 // understand by moving everything to the abstract interface and saying that |
100 // there should never be a NULL RenderThread::current(). Tests would be | 94 // there should never be a NULL RenderThread::current(). Tests would be |
101 // responsible for setting up the mock one. | 95 // responsible for setting up the mock one. |
102 class RenderThreadBase { | 96 class RenderThreadBase { |
103 public: | 97 public: |
104 virtual ~RenderThreadBase() {} | 98 virtual ~RenderThreadBase() {} |
105 | 99 |
106 // Gets currently loaded extensions. This is essentially the renderer | |
107 // counterpart to ExtensionService in the browser. It contains information | |
108 // about all extensions currently loaded by the browser. | |
109 virtual const ExtensionSet* GetExtensions() const = 0; | |
110 | |
111 virtual bool Send(IPC::Message* msg) = 0; | 100 virtual bool Send(IPC::Message* msg) = 0; |
112 | 101 |
113 // Called to add or remove a listener for a particular message routing ID. | 102 // Called to add or remove a listener for a particular message routing ID. |
114 // These methods normally get delegated to a MessageRouter. | 103 // These methods normally get delegated to a MessageRouter. |
115 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; | 104 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; |
116 virtual void RemoveRoute(int32 routing_id) = 0; | 105 virtual void RemoveRoute(int32 routing_id) = 0; |
117 | 106 |
118 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; | 107 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
119 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; | 108 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
120 | 109 |
121 // Called by a RenderWidget when it is hidden or restored. | 110 // Called by a RenderWidget when it is hidden or restored. |
122 virtual void WidgetHidden() = 0; | 111 virtual void WidgetHidden() = 0; |
123 virtual void WidgetRestored() = 0; | 112 virtual void WidgetRestored() = 0; |
124 | 113 |
125 // True if this process should be treated as an extension process. | |
126 virtual bool IsExtensionProcess() const = 0; | |
127 | |
128 // True if this process is running in an incognito profile. | 114 // True if this process is running in an incognito profile. |
129 virtual bool IsIncognitoProcess() const = 0; | 115 virtual bool IsIncognitoProcess() const = 0; |
130 }; | 116 }; |
131 | 117 |
132 // The RenderThread class represents a background thread where RenderView | 118 // The RenderThread class represents a background thread where RenderView |
133 // instances live. The RenderThread supports an API that is used by its | 119 // instances live. The RenderThread supports an API that is used by its |
134 // consumer to talk indirectly to the RenderViews and supporting objects. | 120 // consumer to talk indirectly to the RenderViews and supporting objects. |
135 // Likewise, it provides an API for the RenderViews to talk back to the main | 121 // Likewise, it provides an API for the RenderViews to talk back to the main |
136 // process (i.e., their corresponding TabContents). | 122 // process (i.e., their corresponding TabContents). |
137 // | 123 // |
(...skipping 15 matching lines...) Expand all Loading... |
153 // TODO(brettw) this should be on the abstract base class instead of here, | 139 // TODO(brettw) this should be on the abstract base class instead of here, |
154 // and return the base class' interface instead. Currently this causes | 140 // and return the base class' interface instead. Currently this causes |
155 // problems with testing. See the comment above RenderThreadBase above. | 141 // problems with testing. See the comment above RenderThreadBase above. |
156 static RenderThread* current(); | 142 static RenderThread* current(); |
157 | 143 |
158 // Returns the routing ID of the RenderWidget containing the current script | 144 // Returns the routing ID of the RenderWidget containing the current script |
159 // execution context (corresponding to WebFrame::frameForCurrentContext). | 145 // execution context (corresponding to WebFrame::frameForCurrentContext). |
160 static int32 RoutingIDForCurrentContext(); | 146 static int32 RoutingIDForCurrentContext(); |
161 | 147 |
162 // Overridden from RenderThreadBase. | 148 // Overridden from RenderThreadBase. |
163 virtual const ExtensionSet* GetExtensions() const; | |
164 virtual bool Send(IPC::Message* msg); | 149 virtual bool Send(IPC::Message* msg); |
165 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); | 150 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); |
166 virtual void RemoveRoute(int32 routing_id); | 151 virtual void RemoveRoute(int32 routing_id); |
167 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); | 152 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); |
168 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); | 153 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); |
169 virtual void WidgetHidden(); | 154 virtual void WidgetHidden(); |
170 virtual void WidgetRestored(); | 155 virtual void WidgetRestored(); |
171 virtual bool IsExtensionProcess() const; | |
172 virtual bool IsIncognitoProcess() const; | 156 virtual bool IsIncognitoProcess() const; |
173 | 157 |
174 void AddObserver(RenderProcessObserver* observer); | 158 void AddObserver(RenderProcessObserver* observer); |
175 void RemoveObserver(RenderProcessObserver* observer); | 159 void RemoveObserver(RenderProcessObserver* observer); |
176 | 160 |
177 // These methods modify how the next message is sent. Normally, when sending | 161 // These methods modify how the next message is sent. Normally, when sending |
178 // a synchronous message that runs a nested message loop, we need to suspend | 162 // a synchronous message that runs a nested message loop, we need to suspend |
179 // callbacks into WebKit. This involves disabling timers and deferring | 163 // callbacks into WebKit. This involves disabling timers and deferring |
180 // resource loads. However, there are exceptions when we need to customize | 164 // resource loads. However, there are exceptions when we need to customize |
181 // the behavior. | 165 // the behavior. |
182 void DoNotSuspendWebKitSharedTimer(); | 166 void DoNotSuspendWebKitSharedTimer(); |
183 void DoNotNotifyWebKitOfModalLoop(); | 167 void DoNotNotifyWebKitOfModalLoop(); |
184 | 168 |
185 VisitedLinkSlave* visited_link_slave() const { | 169 VisitedLinkSlave* visited_link_slave() const { |
186 return visited_link_slave_.get(); | 170 return visited_link_slave_.get(); |
187 } | 171 } |
188 | 172 |
189 UserScriptSlave* user_script_slave() const { | |
190 return user_script_slave_.get(); | |
191 } | |
192 | |
193 AppCacheDispatcher* appcache_dispatcher() const { | 173 AppCacheDispatcher* appcache_dispatcher() const { |
194 return appcache_dispatcher_.get(); | 174 return appcache_dispatcher_.get(); |
195 } | 175 } |
196 | 176 |
197 IndexedDBDispatcher* indexed_db_dispatcher() const { | 177 IndexedDBDispatcher* indexed_db_dispatcher() const { |
198 return indexed_db_dispatcher_.get(); | 178 return indexed_db_dispatcher_.get(); |
199 } | 179 } |
200 | 180 |
201 SpellCheck* spellchecker() const { | 181 SpellCheck* spellchecker() const { |
202 return spellchecker_.get(); | 182 return spellchecker_.get(); |
203 } | 183 } |
204 | 184 |
205 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } | 185 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } |
206 | 186 |
| 187 double idle_notification_delay_in_s() const { |
| 188 return idle_notification_delay_in_s_; |
| 189 } |
| 190 void set_idle_notification_delay_in_s(double idle_notification_delay_in_s) { |
| 191 idle_notification_delay_in_s = idle_notification_delay_in_s; |
| 192 } |
| 193 |
207 // Do DNS prefetch resolution of a hostname. | 194 // Do DNS prefetch resolution of a hostname. |
208 void Resolve(const char* name, size_t length); | 195 void Resolve(const char* name, size_t length); |
209 | 196 |
210 // Send all the Histogram data to browser. | 197 // Send all the Histogram data to browser. |
211 void SendHistograms(int sequence_number); | 198 void SendHistograms(int sequence_number); |
212 | 199 |
213 // Invokes InformHostOfCacheStats after a short delay. Used to move this | 200 // Invokes InformHostOfCacheStats after a short delay. Used to move this |
214 // bookkeeping operation off the critical latency path. | 201 // bookkeeping operation off the critical latency path. |
215 void InformHostOfCacheStatsLater(); | 202 void InformHostOfCacheStatsLater(); |
216 | 203 |
217 // Sends a message to the browser to close all connections. | 204 // Sends a message to the browser to close all connections. |
218 void CloseCurrentConnections(); | 205 void CloseCurrentConnections(); |
219 | 206 |
220 // Sends a message to the browser to enable or disable the disk cache. | 207 // Sends a message to the browser to enable or disable the disk cache. |
221 void SetCacheMode(bool enabled); | 208 void SetCacheMode(bool enabled); |
222 | 209 |
223 // Sends a message to the browser to clear the disk cache. | 210 // Sends a message to the browser to clear the disk cache. |
224 // |preserve_ssl_host_info| is a flag indicating if the cache should purge | 211 // |preserve_ssl_host_info| is a flag indicating if the cache should purge |
225 // entries related to cached SSL information. | 212 // entries related to cached SSL information. |
226 void ClearCache(bool preserve_ssl_host_info); | 213 void ClearCache(bool preserve_ssl_host_info); |
227 | 214 |
228 // Sends a message to the browser to enable/disable spdy. | 215 // Sends a message to the browser to enable/disable spdy. |
229 void EnableSpdy(bool enable); | 216 void EnableSpdy(bool enable); |
230 | 217 |
231 // Update the list of active extensions that will be reported when we crash. | |
232 void UpdateActiveExtensions(); | |
233 | |
234 // Asynchronously establish a channel to the GPU plugin if not previously | 218 // Asynchronously establish a channel to the GPU plugin if not previously |
235 // established or if it has been lost (for example if the GPU plugin crashed). | 219 // established or if it has been lost (for example if the GPU plugin crashed). |
236 // Use GetGpuChannel() to determine when the channel is ready for use. | 220 // Use GetGpuChannel() to determine when the channel is ready for use. |
237 void EstablishGpuChannel(); | 221 void EstablishGpuChannel(); |
238 | 222 |
239 // Synchronously establish a channel to the GPU plugin if not previously | 223 // Synchronously establish a channel to the GPU plugin if not previously |
240 // established or if it has been lost (for example if the GPU plugin crashed). | 224 // established or if it has been lost (for example if the GPU plugin crashed). |
241 // If there is a pending asynchronous request, it will be completed by the | 225 // If there is a pending asynchronous request, it will be completed by the |
242 // time this routine returns. | 226 // time this routine returns. |
243 GpuChannelHost* EstablishGpuChannelSync(); | 227 GpuChannelHost* EstablishGpuChannelSync(); |
(...skipping 13 matching lines...) Expand all Loading... |
257 bool AllowScriptExtension(const std::string& v8_extension_name, | 241 bool AllowScriptExtension(const std::string& v8_extension_name, |
258 const GURL& url, | 242 const GURL& url, |
259 int extension_group); | 243 int extension_group); |
260 | 244 |
261 // Hack for http://crbug.com/71735. | 245 // Hack for http://crbug.com/71735. |
262 // TODO(jamesr): remove once http://crbug.com/72007 is fixed. | 246 // TODO(jamesr): remove once http://crbug.com/72007 is fixed. |
263 RendererWebKitClientImpl* GetWebKitClientImpl() const { | 247 RendererWebKitClientImpl* GetWebKitClientImpl() const { |
264 return webkit_client_.get(); | 248 return webkit_client_.get(); |
265 } | 249 } |
266 | 250 |
| 251 // Schedule a call to IdleHandler with the given initial delay. |
| 252 void ScheduleIdleHandler(double initial_delay_s); |
| 253 |
| 254 // A task we invoke periodically to assist with idle cleanup. |
| 255 void IdleHandler(); |
| 256 |
| 257 // Registers the given V8 extension with WebKit. |
| 258 void RegisterExtension(v8::Extension* extension); |
| 259 |
267 private: | 260 private: |
268 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 261 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
269 | 262 |
270 void Init(); | 263 void Init(); |
271 | 264 |
272 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); | 265 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); |
273 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); | 266 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); |
274 void OnResetVisitedLinks(); | 267 void OnResetVisitedLinks(); |
275 void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level); | 268 void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level); |
276 void OnSetContentSettingsForCurrentURL( | 269 void OnSetContentSettingsForCurrentURL( |
277 const GURL& url, const ContentSettings& content_settings); | 270 const GURL& url, const ContentSettings& content_settings); |
278 void OnUpdateUserScripts(base::SharedMemoryHandle table); | |
279 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); | |
280 void OnExtensionLoaded(const ExtensionMsg_Loaded_Params& params); | |
281 void OnExtensionUnloaded(const std::string& id); | |
282 void OnSetExtensionScriptingWhitelist( | |
283 const Extension::ScriptingWhitelist& extension_ids); | |
284 void OnPageActionsUpdated(const std::string& extension_id, | |
285 const std::vector<std::string>& page_actions); | |
286 void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params); | 271 void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params); |
287 void OnExtensionSetAPIPermissions( | |
288 const std::string& extension_id, | |
289 const std::set<std::string>& permissions); | |
290 void OnExtensionSetHostPermissions( | |
291 const GURL& extension_url, | |
292 const std::vector<URLPattern>& permissions); | |
293 void OnSetNextPageID(int32 next_page_id); | 272 void OnSetNextPageID(int32 next_page_id); |
294 void OnSetIsIncognitoProcess(bool is_incognito_process); | 273 void OnSetIsIncognitoProcess(bool is_incognito_process); |
295 void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); | 274 void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); |
296 void OnCreateNewView(const ViewMsg_New_Params& params); | 275 void OnCreateNewView(const ViewMsg_New_Params& params); |
297 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 276 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
298 void OnSetCacheCapacities(size_t min_dead_capacity, | 277 void OnSetCacheCapacities(size_t min_dead_capacity, |
299 size_t max_dead_capacity, | 278 size_t max_dead_capacity, |
300 size_t capacity); | 279 size_t capacity); |
301 void OnClearCache(); | 280 void OnClearCache(); |
302 void OnGetCacheResourceStats(); | 281 void OnGetCacheResourceStats(); |
303 | 282 |
304 // Send all histograms to browser. | 283 // Send all histograms to browser. |
305 void OnGetRendererHistograms(int sequence_number); | 284 void OnGetRendererHistograms(int sequence_number); |
306 | 285 |
307 // Send tcmalloc info to browser. | 286 // Send tcmalloc info to browser. |
308 void OnGetRendererTcmalloc(); | 287 void OnGetRendererTcmalloc(); |
309 void OnGetV8HeapStats(); | 288 void OnGetV8HeapStats(); |
310 | 289 |
311 void OnExtensionMessageInvoke(const std::string& extension_id, | |
312 const std::string& function_name, | |
313 const ListValue& args, | |
314 const GURL& event_url); | |
315 void OnPurgeMemory(); | 290 void OnPurgeMemory(); |
316 void OnPurgePluginListCache(bool reload_pages); | 291 void OnPurgePluginListCache(bool reload_pages); |
317 | 292 |
318 void OnInitSpellChecker(IPC::PlatformFileForTransit bdict_file, | 293 void OnInitSpellChecker(IPC::PlatformFileForTransit bdict_file, |
319 const std::vector<std::string>& custom_words, | 294 const std::vector<std::string>& custom_words, |
320 const std::string& language, | 295 const std::string& language, |
321 bool auto_spell_correct); | 296 bool auto_spell_correct); |
322 void OnSpellCheckWordAdded(const std::string& word); | 297 void OnSpellCheckWordAdded(const std::string& word); |
323 void OnSpellCheckEnableAutoSpellCorrect(bool enable); | 298 void OnSpellCheckEnableAutoSpellCorrect(bool enable); |
324 | 299 |
325 void OnGpuChannelEstablished(const IPC::ChannelHandle& channel_handle, | 300 void OnGpuChannelEstablished(const IPC::ChannelHandle& channel_handle, |
326 base::ProcessHandle renderer_process_for_gpu, | 301 base::ProcessHandle renderer_process_for_gpu, |
327 const GPUInfo& gpu_info); | 302 const GPUInfo& gpu_info); |
328 | 303 |
329 void OnSetPhishingModel(IPC::PlatformFileForTransit model_file); | 304 void OnSetPhishingModel(IPC::PlatformFileForTransit model_file); |
330 | 305 |
331 void OnGetAccessibilityTree(); | 306 void OnGetAccessibilityTree(); |
332 | 307 |
333 // Gather usage statistics from the in-memory cache and inform our host. | 308 // Gather usage statistics from the in-memory cache and inform our host. |
334 // These functions should be call periodically so that the host can make | 309 // These functions should be call periodically so that the host can make |
335 // decisions about how to allocation resources using current information. | 310 // decisions about how to allocation resources using current information. |
336 void InformHostOfCacheStats(); | 311 void InformHostOfCacheStats(); |
337 | 312 |
338 // We initialize WebKit as late as possible. | 313 // We initialize WebKit as late as possible. |
339 void EnsureWebKitInitialized(); | 314 void EnsureWebKitInitialized(); |
340 | 315 |
341 // A task we invoke periodically to assist with idle cleanup. | |
342 void IdleHandler(); | |
343 | |
344 // Schedule a call to IdleHandler with the given initial delay. | |
345 void ScheduleIdleHandler(double initial_delay_s); | |
346 | |
347 // Registers the given V8 extension with WebKit, and also tracks what pages | |
348 // it is allowed to run on. | |
349 void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions); | |
350 | |
351 // These objects live solely on the render thread. | 316 // These objects live solely on the render thread. |
352 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_; | 317 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_; |
353 scoped_ptr<VisitedLinkSlave> visited_link_slave_; | 318 scoped_ptr<VisitedLinkSlave> visited_link_slave_; |
354 scoped_ptr<UserScriptSlave> user_script_slave_; | |
355 scoped_ptr<RendererNetPredictor> renderer_net_predictor_; | 319 scoped_ptr<RendererNetPredictor> renderer_net_predictor_; |
356 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; | 320 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; |
357 scoped_ptr<IndexedDBDispatcher> indexed_db_dispatcher_; | 321 scoped_ptr<IndexedDBDispatcher> indexed_db_dispatcher_; |
358 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_; | 322 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_; |
359 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; | 323 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; |
360 scoped_ptr<RendererWebKitClientImpl> webkit_client_; | 324 scoped_ptr<RendererWebKitClientImpl> webkit_client_; |
361 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; | 325 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; |
362 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; | 326 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; |
363 scoped_ptr<SpellCheck> spellchecker_; | 327 scoped_ptr<SpellCheck> spellchecker_; |
364 | 328 |
(...skipping 14 matching lines...) Expand all Loading... |
379 | 343 |
380 // The count of RenderWidgets running through this thread. | 344 // The count of RenderWidgets running through this thread. |
381 int widget_count_; | 345 int widget_count_; |
382 | 346 |
383 // The count of hidden RenderWidgets running through this thread. | 347 // The count of hidden RenderWidgets running through this thread. |
384 int hidden_widget_count_; | 348 int hidden_widget_count_; |
385 | 349 |
386 // The current value of the idle notification timer delay. | 350 // The current value of the idle notification timer delay. |
387 double idle_notification_delay_in_s_; | 351 double idle_notification_delay_in_s_; |
388 | 352 |
389 // True if this renderer is running extensions. | |
390 bool is_extension_process_; | |
391 | |
392 // True if this renderer is incognito. | 353 // True if this renderer is incognito. |
393 bool is_incognito_process_; | 354 bool is_incognito_process_; |
394 | 355 |
395 bool suspend_webkit_shared_timer_; | 356 bool suspend_webkit_shared_timer_; |
396 bool notify_webkit_of_modal_loop_; | 357 bool notify_webkit_of_modal_loop_; |
397 | 358 |
398 // Timer that periodically calls IdleHandler. | 359 // Timer that periodically calls IdleHandler. |
399 base::RepeatingTimer<RenderThread> idle_timer_; | 360 base::RepeatingTimer<RenderThread> idle_timer_; |
400 | 361 |
401 // Same as above, but on a longer timer and will run even if the process is | |
402 // not idle, to ensure that IdleHandle gets called eventually. | |
403 base::RepeatingTimer<RenderThread> forced_idle_timer_; | |
404 | |
405 // The channel from the renderer process to the GPU process. | 362 // The channel from the renderer process to the GPU process. |
406 scoped_refptr<GpuChannelHost> gpu_channel_; | 363 scoped_refptr<GpuChannelHost> gpu_channel_; |
407 | 364 |
408 // A lazily initiated thread on which file operations are run. | 365 // A lazily initiated thread on which file operations are run. |
409 scoped_ptr<base::Thread> file_thread_; | 366 scoped_ptr<base::Thread> file_thread_; |
410 | 367 |
411 // Map of registered v8 extensions. The key is the extension name. The value | 368 // Map of registered v8 extensions. The key is the extension name. |
412 // is true if the extension should be restricted to extension-related | 369 std::set<std::string> v8_extensions_; |
413 // contexts. | |
414 std::map<std::string, bool> v8_extensions_; | |
415 | |
416 // Contains all loaded extensions. | |
417 ExtensionSet extensions_; | |
418 | 370 |
419 chrome::ChromeContentRendererClient renderer_client_; | 371 chrome::ChromeContentRendererClient renderer_client_; |
420 | 372 |
421 ObserverList<RenderProcessObserver> observers_; | 373 ObserverList<RenderProcessObserver> observers_; |
422 | 374 |
423 DISALLOW_COPY_AND_ASSIGN(RenderThread); | 375 DISALLOW_COPY_AND_ASSIGN(RenderThread); |
424 }; | 376 }; |
425 | 377 |
426 #endif // CHROME_RENDERER_RENDER_THREAD_H_ | 378 #endif // CHROME_RENDERER_RENDER_THREAD_H_ |
OLD | NEW |