blob: db542bd6dbe452fd6cc9cc97b05d133e59f44030 [file] [log] [blame]
[email protected]f85f0702010-01-30 09:31:011// Copyright (c) 2010 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]1d97d2e2008-12-18 23:39:025#ifndef CHROME_RENDERER_RENDER_THREAD_H_
6#define CHROME_RENDERER_RENDER_THREAD_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
initial.commit09911bf2008-07-26 23:55:298
[email protected]af7eb3fb2010-09-23 21:31:069#include <map>
[email protected]b68d5ed2009-04-16 02:41:2810#include <string>
[email protected]1bc83062009-02-06 00:16:3711#include <vector>
12
[email protected]1223d6ef2011-03-28 16:47:5013#include "base/observer_list.h"
initial.commit09911bf2008-07-26 23:55:2914#include "base/shared_memory.h"
[email protected]71d6d852009-12-07 22:12:3615#include "base/time.h"
16#include "base/timer.h"
[email protected]037fce02009-01-22 01:42:1517#include "build/build_config.h"
[email protected]ec7db282011-01-29 01:11:3618#include "chrome/common/extensions/extension_set.h"
[email protected]53c607c2011-03-21 23:19:0419#include "chrome/renderer/chrome_content_renderer_client.h"
[email protected]3e90d4a2009-07-03 17:38:3920#include "chrome/renderer/visitedlink_slave.h"
[email protected]7ef40ffe12011-03-08 05:05:2821#include "content/common/child_thread.h"
[email protected]778574e2011-03-21 22:03:5022#include "content/common/css_colors.h"
[email protected]a83d42292010-08-17 22:51:1023#include "ipc/ipc_channel_proxy.h"
[email protected]cb6037d2009-11-16 22:55:1724#include "ipc/ipc_platform_file.h"
[email protected]08397d52011-02-05 01:53:3825#include "ui/gfx/native_widget_types.h"
initial.commit09911bf2008-07-26 23:55:2926
[email protected]1edc16b82009-04-07 17:45:5427class AppCacheDispatcher;
[email protected]dd9241932010-02-24 19:23:1328class CookieMessageFilter;
[email protected]017022b2009-07-27 23:06:3429class DBMessageFilter;
[email protected]a8624712009-04-17 00:51:3530class DevToolsAgentFilter;
[email protected]ec7db282011-01-29 01:11:3631class ExtensionSet;
[email protected]39008c02009-02-11 23:59:2532class FilePath;
[email protected]e13ad79b2010-07-22 21:36:5033class GpuChannelHost;
[email protected]70c19a932010-05-14 12:59:1134class IndexedDBDispatcher;
[email protected]dfcb62a2009-06-17 19:32:4335class ListValue;
[email protected]55e57d42009-02-25 06:10:1736class RendererHistogram;
[email protected]e13ad79b2010-07-22 21:36:5037class RendererHistogramSnapshots;
[email protected]1223d6ef2011-03-28 16:47:5038class RenderProcessObserver;
[email protected]74be069e82010-06-25 00:12:4939class RendererNetPredictor;
[email protected]8d86fce2009-02-26 23:37:5540class RendererWebKitClientImpl;
[email protected]85c55dc2009-11-06 03:05:4641class SpellCheck;
[email protected]39008c02009-02-11 23:59:2542class SkBitmap;
[email protected]4d395d092009-02-11 21:40:4043class UserScriptSlave;
[email protected]cccf90932009-08-23 17:56:2544class URLPattern;
[email protected]2b437e232010-04-02 01:30:0845class WebDatabaseObserverImpl;
[email protected]cccf90932009-08-23 17:56:2546
[email protected]f85f0702010-01-30 09:31:0147struct ContentSettings;
[email protected]9b6f40e2009-06-11 15:54:2648struct RendererPreferences;
[email protected]56879f932010-12-13 21:05:3749struct DOMStorageMsg_Event_Params;
[email protected]d6d8f712011-03-10 22:54:4350struct GPUInfo;
[email protected]44c49c92011-03-28 16:17:2351struct ExtensionMsg_Loaded_Params;
[email protected]4e6419c2010-01-15 04:50:3452struct ViewMsg_New_Params;
[email protected]39008c02009-02-11 23:59:2553struct WebPreferences;
initial.commit09911bf2008-07-26 23:55:2954
[email protected]c6a7b862010-08-20 22:19:3855namespace base {
56class MessageLoopProxy;
57class Thread;
58}
59
[email protected]46f36a492010-07-28 19:36:4160namespace IPC {
61struct ChannelHandle;
62}
63
[email protected]b7c7bcf2009-10-03 07:07:3464namespace WebKit {
65class WebStorageEventDispatcher;
66}
67
[email protected]af7eb3fb2010-09-23 21:31:0668namespace v8 {
69class Extension;
70}
71
[email protected]81a34412009-01-05 19:17:2472// The RenderThreadBase is the minimal interface that a RenderView/Widget
73// expects from a render thread. The interface basically abstracts a way to send
74// and receive messages.
[email protected]00c39612010-03-06 02:53:2875//
[email protected]f3ede412010-06-21 22:52:1676// TODO(brettw): This has two different and opposing usage patterns which
77// make it confusing.
78//
79// In the first mode, callers call RenderThread::current() to get the one and
80// only global RenderThread (bug 10837: this should be renamed get()). Then
81// they access it. Since RenderThread is a concrete class, this can be NULL
82// during unit tests. Callers need to NULL check this every time. Some callers
83// don't happen to get called during unit tests and don't do the NULL checks,
84// which is also confusing since it's not clear if you need to or not.
85//
86// In the second mode, the abstract base class RenderThreadBase is passed to
87// RenderView and RenderWidget. Normally, this points to
88// RenderThread::current() so it's quite confusing which accessing mode should
89// be used. However, during unit testing, this class is replaced with a mock
90// to support testing functions, and is guaranteed non-NULL.
91//
92// It might be nice not to have the ::current() call and put all of the
93// functions on the abstract class so they can be mocked. However, there are
94// some standalone functions like in ChromiumBridge that are not associated
95// with a view that need to access the current thread to send messages to the
96// browser process. These need the ::current() paradigm. So instead, we should
97// probably remove the render_thread_ parameter to RenderView/Widget in
98// 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
100// there should never be a NULL RenderThread::current(). Tests would be
101// responsible for setting up the mock one.
[email protected]8930d472009-02-21 08:05:28102class RenderThreadBase {
[email protected]8085dbc82008-09-26 22:53:44103 public:
104 virtual ~RenderThreadBase() {}
105
[email protected]ec7db282011-01-29 01:11:36106 // 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;
[email protected]2a521c52011-01-26 18:45:21110
[email protected]8930d472009-02-21 08:05:28111 virtual bool Send(IPC::Message* msg) = 0;
112
[email protected]8085dbc82008-09-26 22:53:44113 // Called to add or remove a listener for a particular message routing ID.
114 // These methods normally get delegated to a MessageRouter.
115 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0;
116 virtual void RemoveRoute(int32 routing_id) = 0;
[email protected]81a34412009-01-05 19:17:24117
118 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
119 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
[email protected]bee16aab2009-08-26 15:55:03120
121 // Called by a RenderWidget when it is hidden or restored.
122 virtual void WidgetHidden() = 0;
123 virtual void WidgetRestored() = 0;
[email protected]b8f41a192010-04-19 18:25:04124
125 // True if this process should be treated as an extension process.
126 virtual bool IsExtensionProcess() const = 0;
[email protected]bc535ee52010-08-31 18:40:32127
128 // True if this process is running in an incognito profile.
129 virtual bool IsIncognitoProcess() const = 0;
[email protected]8085dbc82008-09-26 22:53:44130};
131
initial.commit09911bf2008-07-26 23:55:29132// The RenderThread class represents a background thread where RenderView
133// instances live. The RenderThread supports an API that is used by its
134// 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
[email protected]57c6a652009-05-04 07:58:34136// process (i.e., their corresponding TabContents).
initial.commit09911bf2008-07-26 23:55:29137//
138// Most of the communication occurs in the form of IPC messages. They are
139// routed to the RenderThread according to the routing IDs of the messages.
140// The routing IDs correspond to RenderView instances.
[email protected]8930d472009-02-21 08:05:28141class RenderThread : public RenderThreadBase,
142 public ChildThread {
initial.commit09911bf2008-07-26 23:55:29143 public:
[email protected]8930d472009-02-21 08:05:28144 // Grabs the IPC channel name from the command line.
145 RenderThread();
146 // Constructor that's used when running in single process mode.
[email protected]11f4857282009-11-13 19:56:17147 explicit RenderThread(const std::string& channel_name);
[email protected]8085dbc82008-09-26 22:53:44148 virtual ~RenderThread();
initial.commit09911bf2008-07-26 23:55:29149
[email protected]8930d472009-02-21 08:05:28150 // Returns the one render thread for this process. Note that this should only
151 // be accessed when running on the render thread itself
[email protected]00c39612010-03-06 02:53:28152 //
153 // TODO(brettw) this should be on the abstract base class instead of here,
154 // and return the base class' interface instead. Currently this causes
155 // problems with testing. See the comment above RenderThreadBase above.
[email protected]8930d472009-02-21 08:05:28156 static RenderThread* current();
initial.commit09911bf2008-07-26 23:55:29157
[email protected]c1f50aa2010-02-18 03:46:57158 // Returns the routing ID of the RenderWidget containing the current script
159 // execution context (corresponding to WebFrame::frameForCurrentContext).
160 static int32 RoutingIDForCurrentContext();
161
[email protected]45776222009-07-15 20:21:58162 // Overridden from RenderThreadBase.
[email protected]ec7db282011-01-29 01:11:36163 virtual const ExtensionSet* GetExtensions() const;
[email protected]c1f50aa2010-02-18 03:46:57164 virtual bool Send(IPC::Message* msg);
165 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
166 virtual void RemoveRoute(int32 routing_id);
[email protected]81a34412009-01-05 19:17:24167 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
168 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter);
[email protected]bee16aab2009-08-26 15:55:03169 virtual void WidgetHidden();
170 virtual void WidgetRestored();
[email protected]e4be2dd2010-12-14 00:44:39171 virtual bool IsExtensionProcess() const;
172 virtual bool IsIncognitoProcess() const;
[email protected]bee16aab2009-08-26 15:55:03173
[email protected]1223d6ef2011-03-28 16:47:50174 void AddObserver(RenderProcessObserver* observer);
175 void RemoveObserver(RenderProcessObserver* observer);
176
[email protected]c1f50aa2010-02-18 03:46:57177 // 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
179 // callbacks into WebKit. This involves disabling timers and deferring
180 // resource loads. However, there are exceptions when we need to customize
181 // the behavior.
182 void DoNotSuspendWebKitSharedTimer();
183 void DoNotNotifyWebKitOfModalLoop();
184
[email protected]8d86fce2009-02-26 23:37:55185 VisitedLinkSlave* visited_link_slave() const {
186 return visited_link_slave_.get();
187 }
initial.commit09911bf2008-07-26 23:55:29188
[email protected]8d86fce2009-02-26 23:37:55189 UserScriptSlave* user_script_slave() const {
190 return user_script_slave_.get();
191 }
[email protected]1e0f70402008-10-16 23:57:47192
[email protected]f430b5712009-08-21 21:46:31193 AppCacheDispatcher* appcache_dispatcher() const {
194 return appcache_dispatcher_.get();
195 }
196
[email protected]70c19a932010-05-14 12:59:11197 IndexedDBDispatcher* indexed_db_dispatcher() const {
198 return indexed_db_dispatcher_.get();
199 }
200
[email protected]85c55dc2009-11-06 03:05:46201 SpellCheck* spellchecker() const {
202 return spellchecker_.get();
203 }
[email protected]85c55dc2009-11-06 03:05:46204
[email protected]b547fd42009-04-23 23:16:27205 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; }
206
initial.commit09911bf2008-07-26 23:55:29207 // Do DNS prefetch resolution of a hostname.
208 void Resolve(const char* name, size_t length);
209
[email protected]55e57d42009-02-25 06:10:17210 // Send all the Histogram data to browser.
[email protected]c9a3ef82009-05-28 22:02:46211 void SendHistograms(int sequence_number);
[email protected]55e57d42009-02-25 06:10:17212
initial.commit09911bf2008-07-26 23:55:29213 // Invokes InformHostOfCacheStats after a short delay. Used to move this
214 // bookkeeping operation off the critical latency path.
215 void InformHostOfCacheStatsLater();
216
[email protected]c40acc32010-01-14 01:02:53217 // Sends a message to the browser to close all connections.
218 void CloseCurrentConnections();
[email protected]b07f29092009-06-05 07:33:21219
220 // Sends a message to the browser to enable or disable the disk cache.
221 void SetCacheMode(bool enabled);
222
[email protected]c5d79342010-06-05 01:27:34223 // Sends a message to the browser to clear the disk cache.
[email protected]0e34852a2011-02-15 23:14:44224 // |preserve_ssl_host_info| is a flag indicating if the cache should purge
225 // entries related to cached SSL information.
226 void ClearCache(bool preserve_ssl_host_info);
[email protected]c5d79342010-06-05 01:27:34227
[email protected]12893c32010-08-19 17:30:54228 // Sends a message to the browser to enable/disable spdy.
229 void EnableSpdy(bool enable);
230
[email protected]c8865962009-12-16 07:47:39231 // Update the list of active extensions that will be reported when we crash.
232 void UpdateActiveExtensions();
233
[email protected]6217d392010-03-25 22:08:35234 // 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).
236 // Use GetGpuChannel() to determine when the channel is ready for use.
237 void EstablishGpuChannel();
238
[email protected]3bf4d532010-03-27 00:23:34239 // 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).
241 // If there is a pending asynchronous request, it will be completed by the
242 // time this routine returns.
243 GpuChannelHost* EstablishGpuChannelSync();
244
[email protected]6217d392010-03-25 22:08:35245 // Get the GPU channel. Returns NULL if the channel is not established or
246 // has been lost.
247 GpuChannelHost* GetGpuChannel();
248
[email protected]c6a7b862010-08-20 22:19:38249 // Returns a MessageLoopProxy instance corresponding to the message loop
250 // of the thread on which file operations should be run. Must be called
251 // on the renderer's main thread.
252 scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy();
253
[email protected]af7eb3fb2010-09-23 21:31:06254 // This function is called for every registered V8 extension each time a new
255 // script context is created. Returns true if the given V8 extension is
256 // allowed to run on the given URL and extension group.
257 bool AllowScriptExtension(const std::string& v8_extension_name,
258 const GURL& url,
259 int extension_group);
260
[email protected]08f42e72011-02-16 07:34:40261 // Hack for http://crbug.com/71735.
262 // TODO(jamesr): remove once http://crbug.com/72007 is fixed.
263 RendererWebKitClientImpl* GetWebKitClientImpl() const {
264 return webkit_client_.get();
265 }
266
[email protected]8930d472009-02-21 08:05:28267 private:
[email protected]a95986a82010-12-24 06:19:28268 virtual bool OnControlMessageReceived(const IPC::Message& msg);
initial.commit09911bf2008-07-26 23:55:29269
[email protected]42f1d7822009-07-23 18:17:55270 void Init();
initial.commit09911bf2008-07-26 23:55:29271
[email protected]176aa482008-11-14 03:25:15272 void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
[email protected]3e90d4a2009-07-03 17:38:39273 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints);
274 void OnResetVisitedLinks();
[email protected]b75b8292010-10-01 07:28:25275 void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level);
[email protected]0314ae02010-04-08 09:18:29276 void OnSetContentSettingsForCurrentURL(
277 const GURL& url, const ContentSettings& content_settings);
[email protected]b2a74ca2010-03-12 17:57:09278 void OnUpdateUserScripts(base::SharedMemoryHandle table);
[email protected]703e807a2009-03-28 19:56:51279 void OnSetExtensionFunctionNames(const std::vector<std::string>& names);
[email protected]44c49c92011-03-28 16:17:23280 void OnExtensionLoaded(const ExtensionMsg_Loaded_Params& params);
[email protected]2a521c52011-01-26 18:45:21281 void OnExtensionUnloaded(const std::string& id);
282 void OnSetExtensionScriptingWhitelist(
283 const Extension::ScriptingWhitelist& extension_ids);
[email protected]45776222009-07-15 20:21:58284 void OnPageActionsUpdated(const std::string& extension_id,
[email protected]b7c7bcf2009-10-03 07:07:34285 const std::vector<std::string>& page_actions);
[email protected]56879f932010-12-13 21:05:37286 void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params);
[email protected]75e126b932009-09-28 19:38:49287 void OnExtensionSetAPIPermissions(
288 const std::string& extension_id,
[email protected]0df165f2010-09-28 16:49:40289 const std::set<std::string>& permissions);
[email protected]75e126b932009-09-28 19:38:49290 void OnExtensionSetHostPermissions(
291 const GURL& extension_url,
292 const std::vector<URLPattern>& permissions);
initial.commit09911bf2008-07-26 23:55:29293 void OnSetNextPageID(int32 next_page_id);
[email protected]b2a74ca2010-03-12 17:57:09294 void OnSetIsIncognitoProcess(bool is_incognito_process);
[email protected]b9ab10c2009-08-07 18:09:55295 void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors);
[email protected]4e6419c2010-01-15 04:50:34296 void OnCreateNewView(const ViewMsg_New_Params& params);
initial.commit09911bf2008-07-26 23:55:29297 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id);
298 void OnSetCacheCapacities(size_t min_dead_capacity,
299 size_t max_dead_capacity,
300 size_t capacity);
[email protected]163753f2010-10-01 20:59:03301 void OnClearCache();
initial.commit09911bf2008-07-26 23:55:29302 void OnGetCacheResourceStats();
303
[email protected]55e57d42009-02-25 06:10:17304 // Send all histograms to browser.
[email protected]c9a3ef82009-05-28 22:02:46305 void OnGetRendererHistograms(int sequence_number);
[email protected]55e57d42009-02-25 06:10:17306
[email protected]d41041092009-10-08 06:56:57307 // Send tcmalloc info to browser.
308 void OnGetRendererTcmalloc();
[email protected]38b48a82009-11-11 01:51:32309 void OnGetV8HeapStats();
[email protected]d41041092009-10-08 06:56:57310
[email protected]a7ab1b782010-10-21 23:24:16311 void OnExtensionMessageInvoke(const std::string& extension_id,
312 const std::string& function_name,
[email protected]d7259472010-03-24 08:40:49313 const ListValue& args,
[email protected]a807bbe2010-04-14 10:51:19314 const GURL& event_url);
[email protected]fede6ca12009-10-08 18:24:26315 void OnPurgeMemory();
[email protected]b78e168b2009-09-21 22:05:45316 void OnPurgePluginListCache(bool reload_pages);
[email protected]75e5a872009-04-02 23:56:11317
[email protected]cb6037d2009-11-16 22:55:17318 void OnInitSpellChecker(IPC::PlatformFileForTransit bdict_file,
[email protected]85c55dc2009-11-06 03:05:46319 const std::vector<std::string>& custom_words,
320 const std::string& language,
321 bool auto_spell_correct);
322 void OnSpellCheckWordAdded(const std::string& word);
323 void OnSpellCheckEnableAutoSpellCorrect(bool enable);
[email protected]85c55dc2009-11-06 03:05:46324
[email protected]4bce24e2010-09-07 20:45:01325 void OnGpuChannelEstablished(const IPC::ChannelHandle& channel_handle,
[email protected]0100b7a2011-02-24 22:54:50326 base::ProcessHandle renderer_process_for_gpu,
[email protected]4bce24e2010-09-07 20:45:01327 const GPUInfo& gpu_info);
[email protected]6217d392010-03-25 22:08:35328
[email protected]31c90db2010-09-23 00:59:18329 void OnSetPhishingModel(IPC::PlatformFileForTransit model_file);
330
[email protected]b3df5a42010-05-11 14:31:09331 void OnGetAccessibilityTree();
332
initial.commit09911bf2008-07-26 23:55:29333 // 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
335 // decisions about how to allocation resources using current information.
336 void InformHostOfCacheStats();
337
[email protected]90a3fbb12009-02-28 01:13:47338 // We initialize WebKit as late as possible.
339 void EnsureWebKitInitialized();
340
[email protected]bee16aab2009-08-26 15:55:03341 // A task we invoke periodically to assist with idle cleanup.
342 void IdleHandler();
343
[email protected]71d6d852009-12-07 22:12:36344 // Schedule a call to IdleHandler with the given initial delay.
345 void ScheduleIdleHandler(double initial_delay_s);
346
[email protected]af7eb3fb2010-09-23 21:31:06347 // 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
initial.commit09911bf2008-07-26 23:55:29351 // These objects live solely on the render thread.
[email protected]bee16aab2009-08-26 15:55:03352 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_;
[email protected]42f1d7822009-07-23 18:17:55353 scoped_ptr<VisitedLinkSlave> visited_link_slave_;
354 scoped_ptr<UserScriptSlave> user_script_slave_;
[email protected]74be069e82010-06-25 00:12:49355 scoped_ptr<RendererNetPredictor> renderer_net_predictor_;
[email protected]f430b5712009-08-21 21:46:31356 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_;
[email protected]70c19a932010-05-14 12:59:11357 scoped_ptr<IndexedDBDispatcher> indexed_db_dispatcher_;
[email protected]9291ed12009-07-23 17:33:22358 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_;
[email protected]42f1d7822009-07-23 18:17:55359 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
360 scoped_ptr<RendererWebKitClientImpl> webkit_client_;
[email protected]b7c7bcf2009-10-03 07:07:34361 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_;
[email protected]2b437e232010-04-02 01:30:08362 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
[email protected]85c55dc2009-11-06 03:05:46363 scoped_ptr<SpellCheck> spellchecker_;
[email protected]9291ed12009-07-23 17:33:22364
[email protected]e2b2d4a2009-10-24 03:32:59365 // Used on the renderer and IPC threads.
[email protected]017022b2009-07-27 23:06:34366 scoped_refptr<DBMessageFilter> db_message_filter_;
[email protected]dd9241932010-02-24 19:23:13367 scoped_refptr<CookieMessageFilter> cookie_message_filter_;
[email protected]017022b2009-07-27 23:06:34368
[email protected]5fa1c542009-05-05 20:36:07369#if defined(OS_POSIX)
370 scoped_refptr<IPC::ChannelProxy::MessageFilter>
371 suicide_on_channel_error_filter_;
372#endif
373
[email protected]b547fd42009-04-23 23:16:27374 // If true, then a GetPlugins call is allowed to rescan the disk.
375 bool plugin_refresh_allowed_;
376
[email protected]bee16aab2009-08-26 15:55:03377 // Is there a pending task for doing CacheStats.
378 bool cache_stats_task_pending_;
379
380 // The count of RenderWidgets running through this thread.
381 int widget_count_;
382
383 // The count of hidden RenderWidgets running through this thread.
384 int hidden_widget_count_;
385
386 // The current value of the idle notification timer delay.
387 double idle_notification_delay_in_s_;
388
[email protected]71d6d852009-12-07 22:12:36389 // True if this renderer is running extensions.
390 bool is_extension_process_;
391
[email protected]b2a74ca2010-03-12 17:57:09392 // True if this renderer is incognito.
393 bool is_incognito_process_;
394
[email protected]80fc08c52010-03-09 07:43:50395 bool suspend_webkit_shared_timer_;
396 bool notify_webkit_of_modal_loop_;
[email protected]c1f50aa2010-02-18 03:46:57397
[email protected]71d6d852009-12-07 22:12:36398 // Timer that periodically calls IdleHandler.
399 base::RepeatingTimer<RenderThread> idle_timer_;
400
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
[email protected]6217d392010-03-25 22:08:35405 // The channel from the renderer process to the GPU process.
406 scoped_refptr<GpuChannelHost> gpu_channel_;
407
[email protected]c6a7b862010-08-20 22:19:38408 // A lazily initiated thread on which file operations are run.
409 scoped_ptr<base::Thread> file_thread_;
410
[email protected]af7eb3fb2010-09-23 21:31:06411 // Map of registered v8 extensions. The key is the extension name. The value
412 // is true if the extension should be restricted to extension-related
413 // contexts.
414 std::map<std::string, bool> v8_extensions_;
415
[email protected]2a521c52011-01-26 18:45:21416 // Contains all loaded extensions.
[email protected]ec7db282011-01-29 01:11:36417 ExtensionSet extensions_;
[email protected]2a521c52011-01-26 18:45:21418
[email protected]53c607c2011-03-21 23:19:04419 chrome::ChromeContentRendererClient renderer_client_;
420
[email protected]1223d6ef2011-03-28 16:47:50421 ObserverList<RenderProcessObserver> observers_;
422
[email protected]1bc83062009-02-06 00:16:37423 DISALLOW_COPY_AND_ASSIGN(RenderThread);
initial.commit09911bf2008-07-26 23:55:29424};
425
[email protected]1d97d2e2008-12-18 23:39:02426#endif // CHROME_RENDERER_RENDER_THREAD_H_