[email protected] | 1d4dbde | 2011-04-01 20:40:35 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
[email protected] | 10e6ab57 | 2011-04-14 23:42:00 | [diff] [blame] | 5 | #ifndef CONTENT_RENDERER_RENDER_THREAD_H_ |
| 6 | #define CONTENT_RENDERER_RENDER_THREAD_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 8 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 9 | #include <set> |
[email protected] | b68d5ed | 2009-04-16 02:41:28 | [diff] [blame] | 10 | #include <string> |
[email protected] | 1bc8306 | 2009-02-06 00:16:37 | [diff] [blame] | 11 | #include <vector> |
| 12 | |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 13 | #include "base/observer_list.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 14 | #include "base/shared_memory.h" |
[email protected] | 71d6d85 | 2009-12-07 22:12:36 | [diff] [blame] | 15 | #include "base/time.h" |
| 16 | #include "base/timer.h" |
[email protected] | 037fce0 | 2009-01-22 01:42:15 | [diff] [blame] | 17 | #include "build/build_config.h" |
[email protected] | 7ef40ffe1 | 2011-03-08 05:05:28 | [diff] [blame] | 18 | #include "content/common/child_thread.h" |
[email protected] | 778574e | 2011-03-21 22:03:50 | [diff] [blame] | 19 | #include "content/common/css_colors.h" |
[email protected] | 202b54ff | 2011-04-22 21:36:38 | [diff] [blame] | 20 | #include "content/common/gpu/gpu_process_launch_causes.h" |
[email protected] | a83d4229 | 2010-08-17 22:51:10 | [diff] [blame] | 21 | #include "ipc/ipc_channel_proxy.h" |
[email protected] | 08397d5 | 2011-02-05 01:53:38 | [diff] [blame] | 22 | #include "ui/gfx/native_widget_types.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 23 | |
[email protected] | 1edc16b8 | 2009-04-07 17:45:54 | [diff] [blame] | 24 | class AppCacheDispatcher; |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 25 | class DBMessageFilter; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 26 | class FilePath; |
[email protected] | e13ad79b | 2010-07-22 21:36:50 | [diff] [blame] | 27 | class GpuChannelHost; |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 28 | class IndexedDBDispatcher; |
[email protected] | 55e57d4 | 2009-02-25 06:10:17 | [diff] [blame] | 29 | class RendererHistogram; |
[email protected] | e13ad79b | 2010-07-22 21:36:50 | [diff] [blame] | 30 | class RendererHistogramSnapshots; |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 31 | class RenderProcessObserver; |
[email protected] | 74be069e8 | 2010-06-25 00:12:49 | [diff] [blame] | 32 | class RendererNetPredictor; |
[email protected] | 8d86fce | 2009-02-26 23:37:55 | [diff] [blame] | 33 | class RendererWebKitClientImpl; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 34 | class SkBitmap; |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame^] | 35 | class VideoCaptureImplManager; |
[email protected] | 2b437e23 | 2010-04-02 01:30:08 | [diff] [blame] | 36 | class WebDatabaseObserverImpl; |
[email protected] | cccf9093 | 2009-08-23 17:56:25 | [diff] [blame] | 37 | |
[email protected] | 9b6f40e | 2009-06-11 15:54:26 | [diff] [blame] | 38 | struct RendererPreferences; |
[email protected] | 56879f93 | 2010-12-13 21:05:37 | [diff] [blame] | 39 | struct DOMStorageMsg_Event_Params; |
[email protected] | d6d8f71 | 2011-03-10 22:54:43 | [diff] [blame] | 40 | struct GPUInfo; |
[email protected] | 4e6419c | 2010-01-15 04:50:34 | [diff] [blame] | 41 | struct ViewMsg_New_Params; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 42 | struct WebPreferences; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 43 | |
[email protected] | c6a7b86 | 2010-08-20 22:19:38 | [diff] [blame] | 44 | namespace base { |
| 45 | class MessageLoopProxy; |
| 46 | class Thread; |
| 47 | } |
| 48 | |
[email protected] | 46f36a49 | 2010-07-28 19:36:41 | [diff] [blame] | 49 | namespace IPC { |
| 50 | struct ChannelHandle; |
| 51 | } |
| 52 | |
[email protected] | b7c7bcf | 2009-10-03 07:07:34 | [diff] [blame] | 53 | namespace WebKit { |
| 54 | class WebStorageEventDispatcher; |
| 55 | } |
| 56 | |
[email protected] | af7eb3fb | 2010-09-23 21:31:06 | [diff] [blame] | 57 | namespace v8 { |
| 58 | class Extension; |
| 59 | } |
| 60 | |
[email protected] | 81a3441 | 2009-01-05 19:17:24 | [diff] [blame] | 61 | // The RenderThreadBase is the minimal interface that a RenderView/Widget |
| 62 | // expects from a render thread. The interface basically abstracts a way to send |
| 63 | // and receive messages. |
[email protected] | 00c3961 | 2010-03-06 02:53:28 | [diff] [blame] | 64 | // |
[email protected] | f3ede41 | 2010-06-21 22:52:16 | [diff] [blame] | 65 | // TODO(brettw): This has two different and opposing usage patterns which |
| 66 | // make it confusing. |
| 67 | // |
| 68 | // In the first mode, callers call RenderThread::current() to get the one and |
| 69 | // only global RenderThread (bug 10837: this should be renamed get()). Then |
| 70 | // they access it. Since RenderThread is a concrete class, this can be NULL |
| 71 | // during unit tests. Callers need to NULL check this every time. Some callers |
| 72 | // don't happen to get called during unit tests and don't do the NULL checks, |
| 73 | // which is also confusing since it's not clear if you need to or not. |
| 74 | // |
| 75 | // In the second mode, the abstract base class RenderThreadBase is passed to |
| 76 | // RenderView and RenderWidget. Normally, this points to |
| 77 | // RenderThread::current() so it's quite confusing which accessing mode should |
| 78 | // be used. However, during unit testing, this class is replaced with a mock |
| 79 | // to support testing functions, and is guaranteed non-NULL. |
| 80 | // |
| 81 | // It might be nice not to have the ::current() call and put all of the |
| 82 | // functions on the abstract class so they can be mocked. However, there are |
| 83 | // some standalone functions like in ChromiumBridge that are not associated |
| 84 | // with a view that need to access the current thread to send messages to the |
| 85 | // browser process. These need the ::current() paradigm. So instead, we should |
| 86 | // probably remove the render_thread_ parameter to RenderView/Widget in |
| 87 | // preference to just getting the global singleton. We can make it easier to |
| 88 | // understand by moving everything to the abstract interface and saying that |
| 89 | // there should never be a NULL RenderThread::current(). Tests would be |
| 90 | // responsible for setting up the mock one. |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 91 | class RenderThreadBase { |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 92 | public: |
| 93 | virtual ~RenderThreadBase() {} |
| 94 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 95 | virtual bool Send(IPC::Message* msg) = 0; |
| 96 | |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 97 | // Called to add or remove a listener for a particular message routing ID. |
| 98 | // These methods normally get delegated to a MessageRouter. |
| 99 | virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; |
| 100 | virtual void RemoveRoute(int32 routing_id) = 0; |
[email protected] | 81a3441 | 2009-01-05 19:17:24 | [diff] [blame] | 101 | |
| 102 | virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
| 103 | virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 104 | |
| 105 | // Called by a RenderWidget when it is hidden or restored. |
| 106 | virtual void WidgetHidden() = 0; |
| 107 | virtual void WidgetRestored() = 0; |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 108 | }; |
| 109 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 110 | // The RenderThread class represents a background thread where RenderView |
| 111 | // instances live. The RenderThread supports an API that is used by its |
| 112 | // consumer to talk indirectly to the RenderViews and supporting objects. |
| 113 | // Likewise, it provides an API for the RenderViews to talk back to the main |
[email protected] | 57c6a65 | 2009-05-04 07:58:34 | [diff] [blame] | 114 | // process (i.e., their corresponding TabContents). |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 115 | // |
| 116 | // Most of the communication occurs in the form of IPC messages. They are |
| 117 | // routed to the RenderThread according to the routing IDs of the messages. |
| 118 | // The routing IDs correspond to RenderView instances. |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 119 | class RenderThread : public RenderThreadBase, |
| 120 | public ChildThread { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 121 | public: |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 122 | // Grabs the IPC channel name from the command line. |
| 123 | RenderThread(); |
| 124 | // Constructor that's used when running in single process mode. |
[email protected] | 11f485728 | 2009-11-13 19:56:17 | [diff] [blame] | 125 | explicit RenderThread(const std::string& channel_name); |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 126 | virtual ~RenderThread(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 127 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 128 | // Returns the one render thread for this process. Note that this should only |
| 129 | // be accessed when running on the render thread itself |
[email protected] | 00c3961 | 2010-03-06 02:53:28 | [diff] [blame] | 130 | // |
| 131 | // TODO(brettw) this should be on the abstract base class instead of here, |
| 132 | // and return the base class' interface instead. Currently this causes |
| 133 | // problems with testing. See the comment above RenderThreadBase above. |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 134 | static RenderThread* current(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 135 | |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 136 | // Returns the routing ID of the RenderWidget containing the current script |
| 137 | // execution context (corresponding to WebFrame::frameForCurrentContext). |
| 138 | static int32 RoutingIDForCurrentContext(); |
| 139 | |
[email protected] | 4577622 | 2009-07-15 20:21:58 | [diff] [blame] | 140 | // Overridden from RenderThreadBase. |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 141 | virtual bool Send(IPC::Message* msg); |
| 142 | virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); |
| 143 | virtual void RemoveRoute(int32 routing_id); |
[email protected] | 81a3441 | 2009-01-05 19:17:24 | [diff] [blame] | 144 | virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); |
| 145 | virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 146 | virtual void WidgetHidden(); |
| 147 | virtual void WidgetRestored(); |
| 148 | |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 149 | void AddObserver(RenderProcessObserver* observer); |
| 150 | void RemoveObserver(RenderProcessObserver* observer); |
| 151 | |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 152 | // These methods modify how the next message is sent. Normally, when sending |
| 153 | // a synchronous message that runs a nested message loop, we need to suspend |
| 154 | // callbacks into WebKit. This involves disabling timers and deferring |
| 155 | // resource loads. However, there are exceptions when we need to customize |
| 156 | // the behavior. |
| 157 | void DoNotSuspendWebKitSharedTimer(); |
| 158 | void DoNotNotifyWebKitOfModalLoop(); |
| 159 | |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 160 | AppCacheDispatcher* appcache_dispatcher() const { |
| 161 | return appcache_dispatcher_.get(); |
| 162 | } |
| 163 | |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 164 | IndexedDBDispatcher* indexed_db_dispatcher() const { |
| 165 | return indexed_db_dispatcher_.get(); |
| 166 | } |
| 167 | |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame^] | 168 | VideoCaptureImplManager* video_capture_impl_manager() const { |
| 169 | return vc_manager_.get(); |
| 170 | } |
| 171 | |
[email protected] | b547fd4 | 2009-04-23 23:16:27 | [diff] [blame] | 172 | bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } |
| 173 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 174 | double idle_notification_delay_in_s() const { |
| 175 | return idle_notification_delay_in_s_; |
| 176 | } |
| 177 | void set_idle_notification_delay_in_s(double idle_notification_delay_in_s) { |
[email protected] | d07495f | 2011-03-29 17:41:28 | [diff] [blame] | 178 | idle_notification_delay_in_s_ = idle_notification_delay_in_s; |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 179 | } |
| 180 | |
[email protected] | c40acc3 | 2010-01-14 01:02:53 | [diff] [blame] | 181 | // Sends a message to the browser to close all connections. |
| 182 | void CloseCurrentConnections(); |
[email protected] | b07f2909 | 2009-06-05 07:33:21 | [diff] [blame] | 183 | |
| 184 | // Sends a message to the browser to enable or disable the disk cache. |
| 185 | void SetCacheMode(bool enabled); |
| 186 | |
[email protected] | c5d7934 | 2010-06-05 01:27:34 | [diff] [blame] | 187 | // Sends a message to the browser to clear the disk cache. |
[email protected] | 0e34852a | 2011-02-15 23:14:44 | [diff] [blame] | 188 | // |preserve_ssl_host_info| is a flag indicating if the cache should purge |
| 189 | // entries related to cached SSL information. |
| 190 | void ClearCache(bool preserve_ssl_host_info); |
[email protected] | c5d7934 | 2010-06-05 01:27:34 | [diff] [blame] | 191 | |
[email protected] | 8990e471 | 2011-03-28 20:50:55 | [diff] [blame] | 192 | // Sends a message to the browser to clear thed host cache. |
| 193 | void ClearHostResolverCache(); |
| 194 | |
| 195 | // Sends a message to the browser to clear the predictor cache. |
| 196 | void ClearPredictorCache(); |
| 197 | |
[email protected] | 12893c3 | 2010-08-19 17:30:54 | [diff] [blame] | 198 | // Sends a message to the browser to enable/disable spdy. |
| 199 | void EnableSpdy(bool enable); |
| 200 | |
[email protected] | 3bf4d53 | 2010-03-27 00:23:34 | [diff] [blame] | 201 | // Synchronously establish a channel to the GPU plugin if not previously |
| 202 | // established or if it has been lost (for example if the GPU plugin crashed). |
| 203 | // If there is a pending asynchronous request, it will be completed by the |
| 204 | // time this routine returns. |
[email protected] | 7f3a2cf | 2011-04-06 00:10:50 | [diff] [blame] | 205 | GpuChannelHost* EstablishGpuChannelSync(content::CauseForGpuLaunch); |
[email protected] | 3bf4d53 | 2010-03-27 00:23:34 | [diff] [blame] | 206 | |
[email protected] | 6217d39 | 2010-03-25 22:08:35 | [diff] [blame] | 207 | // Get the GPU channel. Returns NULL if the channel is not established or |
| 208 | // has been lost. |
| 209 | GpuChannelHost* GetGpuChannel(); |
| 210 | |
[email protected] | c6a7b86 | 2010-08-20 22:19:38 | [diff] [blame] | 211 | // Returns a MessageLoopProxy instance corresponding to the message loop |
| 212 | // of the thread on which file operations should be run. Must be called |
| 213 | // on the renderer's main thread. |
| 214 | scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy(); |
| 215 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 216 | // Schedule a call to IdleHandler with the given initial delay. |
| 217 | void ScheduleIdleHandler(double initial_delay_s); |
| 218 | |
| 219 | // A task we invoke periodically to assist with idle cleanup. |
| 220 | void IdleHandler(); |
| 221 | |
| 222 | // Registers the given V8 extension with WebKit. |
| 223 | void RegisterExtension(v8::Extension* extension); |
| 224 | |
[email protected] | c6e27b9 | 2011-04-30 17:03:43 | [diff] [blame] | 225 | // Returns true iff the extension is registered. |
| 226 | bool IsRegisteredExtension(const std::string& v8_extension_name) const; |
| 227 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 228 | private: |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 229 | virtual bool OnControlMessageReceived(const IPC::Message& msg); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 230 | |
[email protected] | 42f1d782 | 2009-07-23 18:17:55 | [diff] [blame] | 231 | void Init(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 232 | |
[email protected] | b75b829 | 2010-10-01 07:28:25 | [diff] [blame] | 233 | void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level); |
[email protected] | 56879f93 | 2010-12-13 21:05:37 | [diff] [blame] | 234 | void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 235 | void OnSetNextPageID(int32 next_page_id); |
[email protected] | b9ab10c | 2009-08-07 18:09:55 | [diff] [blame] | 236 | void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); |
[email protected] | 4e6419c | 2010-01-15 04:50:34 | [diff] [blame] | 237 | void OnCreateNewView(const ViewMsg_New_Params& params); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 238 | void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
[email protected] | b78e168b | 2009-09-21 22:05:45 | [diff] [blame] | 239 | void OnPurgePluginListCache(bool reload_pages); |
[email protected] | b3df5a4 | 2010-05-11 14:31:09 | [diff] [blame] | 240 | void OnGetAccessibilityTree(); |
| 241 | |
[email protected] | 90a3fbb1 | 2009-02-28 01:13:47 | [diff] [blame] | 242 | // We initialize WebKit as late as possible. |
| 243 | void EnsureWebKitInitialized(); |
| 244 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 245 | // These objects live solely on the render thread. |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 246 | scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 247 | scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 248 | scoped_ptr<IndexedDBDispatcher> indexed_db_dispatcher_; |
[email protected] | 42f1d782 | 2009-07-23 18:17:55 | [diff] [blame] | 249 | scoped_ptr<RendererWebKitClientImpl> webkit_client_; |
[email protected] | b7c7bcf | 2009-10-03 07:07:34 | [diff] [blame] | 250 | scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; |
[email protected] | 9291ed1 | 2009-07-23 17:33:22 | [diff] [blame] | 251 | |
[email protected] | e2b2d4a | 2009-10-24 03:32:59 | [diff] [blame] | 252 | // Used on the renderer and IPC threads. |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 253 | scoped_refptr<DBMessageFilter> db_message_filter_; |
| 254 | |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame^] | 255 | // Used on multiple threads. |
| 256 | scoped_refptr<VideoCaptureImplManager> vc_manager_; |
| 257 | |
[email protected] | 1d4dbde | 2011-04-01 20:40:35 | [diff] [blame] | 258 | // Used on multiple script execution context threads. |
| 259 | scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; |
| 260 | |
[email protected] | b547fd4 | 2009-04-23 23:16:27 | [diff] [blame] | 261 | // If true, then a GetPlugins call is allowed to rescan the disk. |
| 262 | bool plugin_refresh_allowed_; |
| 263 | |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 264 | // The count of RenderWidgets running through this thread. |
| 265 | int widget_count_; |
| 266 | |
| 267 | // The count of hidden RenderWidgets running through this thread. |
| 268 | int hidden_widget_count_; |
| 269 | |
| 270 | // The current value of the idle notification timer delay. |
| 271 | double idle_notification_delay_in_s_; |
| 272 | |
[email protected] | 80fc08c5 | 2010-03-09 07:43:50 | [diff] [blame] | 273 | bool suspend_webkit_shared_timer_; |
| 274 | bool notify_webkit_of_modal_loop_; |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 275 | |
[email protected] | 71d6d85 | 2009-12-07 22:12:36 | [diff] [blame] | 276 | // Timer that periodically calls IdleHandler. |
| 277 | base::RepeatingTimer<RenderThread> idle_timer_; |
| 278 | |
[email protected] | 6217d39 | 2010-03-25 22:08:35 | [diff] [blame] | 279 | // The channel from the renderer process to the GPU process. |
| 280 | scoped_refptr<GpuChannelHost> gpu_channel_; |
| 281 | |
[email protected] | c6a7b86 | 2010-08-20 22:19:38 | [diff] [blame] | 282 | // A lazily initiated thread on which file operations are run. |
| 283 | scoped_ptr<base::Thread> file_thread_; |
| 284 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 285 | // Map of registered v8 extensions. The key is the extension name. |
| 286 | std::set<std::string> v8_extensions_; |
[email protected] | 2a521c5 | 2011-01-26 18:45:21 | [diff] [blame] | 287 | |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 288 | ObserverList<RenderProcessObserver> observers_; |
| 289 | |
[email protected] | 1bc8306 | 2009-02-06 00:16:37 | [diff] [blame] | 290 | DISALLOW_COPY_AND_ASSIGN(RenderThread); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 291 | }; |
| 292 | |
[email protected] | 10e6ab57 | 2011-04-14 23:42:00 | [diff] [blame] | 293 | #endif // CONTENT_RENDERER_RENDER_THREAD_H_ |