[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] | 8d128d6 | 2011-09-13 22:11:57 | [diff] [blame] | 19 | #include "content/common/content_export.h" |
[email protected] | 778574e | 2011-03-21 22:03:50 | [diff] [blame] | 20 | #include "content/common/css_colors.h" |
[email protected] | 202b54ff | 2011-04-22 21:36:38 | [diff] [blame] | 21 | #include "content/common/gpu/gpu_process_launch_causes.h" |
[email protected] | a83d4229 | 2010-08-17 22:51:10 | [diff] [blame] | 22 | #include "ipc/ipc_channel_proxy.h" |
[email protected] | 08397d5 | 2011-02-05 01:53:38 | [diff] [blame] | 23 | #include "ui/gfx/native_widget_types.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 24 | |
[email protected] | 1edc16b8 | 2009-04-07 17:45:54 | [diff] [blame] | 25 | class AppCacheDispatcher; |
[email protected] | f7eb0a39 | 2011-07-12 10:19:51 | [diff] [blame] | 26 | class AudioInputMessageFilter; |
| 27 | class AudioMessageFilter; |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame^] | 28 | class CompositorThread; |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 29 | class DBMessageFilter; |
[email protected] | 8262245 | 2011-07-22 09:57:20 | [diff] [blame] | 30 | class DevToolsAgentFilter; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 31 | class FilePath; |
[email protected] | e13ad79b | 2010-07-22 21:36:50 | [diff] [blame] | 32 | class GpuChannelHost; |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 33 | class IndexedDBDispatcher; |
[email protected] | 55e57d4 | 2009-02-25 06:10:17 | [diff] [blame] | 34 | class RendererHistogram; |
[email protected] | e13ad79b | 2010-07-22 21:36:50 | [diff] [blame] | 35 | class RendererHistogramSnapshots; |
[email protected] | 74be069e8 | 2010-06-25 00:12:49 | [diff] [blame] | 36 | class RendererNetPredictor; |
[email protected] | 8d6cba4 | 2011-09-02 10:05:19 | [diff] [blame] | 37 | class RendererWebKitPlatformSupportImpl; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 38 | class SkBitmap; |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame] | 39 | class VideoCaptureImplManager; |
[email protected] | 2b437e23 | 2010-04-02 01:30:08 | [diff] [blame] | 40 | class WebDatabaseObserverImpl; |
[email protected] | cccf9093 | 2009-08-23 17:56:25 | [diff] [blame] | 41 | |
[email protected] | 9b6f40e | 2009-06-11 15:54:26 | [diff] [blame] | 42 | struct RendererPreferences; |
[email protected] | 56879f93 | 2010-12-13 21:05:37 | [diff] [blame] | 43 | struct DOMStorageMsg_Event_Params; |
[email protected] | d6d8f71 | 2011-03-10 22:54:43 | [diff] [blame] | 44 | struct GPUInfo; |
[email protected] | 4e6419c | 2010-01-15 04:50:34 | [diff] [blame] | 45 | struct ViewMsg_New_Params; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 46 | struct WebPreferences; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 47 | |
[email protected] | 46f36a49 | 2010-07-28 19:36:41 | [diff] [blame] | 48 | namespace IPC { |
| 49 | struct ChannelHandle; |
| 50 | } |
| 51 | |
[email protected] | b7c7bcf | 2009-10-03 07:07:34 | [diff] [blame] | 52 | namespace WebKit { |
| 53 | class WebStorageEventDispatcher; |
| 54 | } |
| 55 | |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 56 | namespace base { |
| 57 | class MessageLoopProxy; |
| 58 | class Thread; |
| 59 | } |
| 60 | |
| 61 | namespace content { |
| 62 | class RenderProcessObserver; |
| 63 | } |
| 64 | |
[email protected] | af7eb3fb | 2010-09-23 21:31:06 | [diff] [blame] | 65 | namespace v8 { |
| 66 | class Extension; |
| 67 | } |
| 68 | |
[email protected] | 81a3441 | 2009-01-05 19:17:24 | [diff] [blame] | 69 | // The RenderThreadBase is the minimal interface that a RenderView/Widget |
| 70 | // expects from a render thread. The interface basically abstracts a way to send |
| 71 | // and receive messages. |
[email protected] | 00c3961 | 2010-03-06 02:53:28 | [diff] [blame] | 72 | // |
[email protected] | f3ede41 | 2010-06-21 22:52:16 | [diff] [blame] | 73 | // TODO(brettw): This has two different and opposing usage patterns which |
[email protected] | 2b7313f | 2011-09-28 20:54:08 | [diff] [blame] | 74 | // make it confusing. It can be accessed through RenderThread::current(), which |
| 75 | // can be NULL during tests, or it can be passed as RenderThreadBase, which is |
| 76 | // mocked during tests. It should be changed to RenderThread::current() |
| 77 | // everywhere. |
[email protected] | f3ede41 | 2010-06-21 22:52:16 | [diff] [blame] | 78 | // |
[email protected] | 2b7313f | 2011-09-28 20:54:08 | [diff] [blame] | 79 | // See crbug.com/98375 for more details. |
[email protected] | 8d128d6 | 2011-09-13 22:11:57 | [diff] [blame] | 80 | class CONTENT_EXPORT RenderThreadBase { |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 81 | public: |
| 82 | virtual ~RenderThreadBase() {} |
| 83 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 84 | virtual bool Send(IPC::Message* msg) = 0; |
| 85 | |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 86 | // Called to add or remove a listener for a particular message routing ID. |
| 87 | // These methods normally get delegated to a MessageRouter. |
| 88 | virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; |
| 89 | virtual void RemoveRoute(int32 routing_id) = 0; |
[email protected] | 81a3441 | 2009-01-05 19:17:24 | [diff] [blame] | 90 | |
| 91 | virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
| 92 | virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 93 | |
| 94 | // Called by a RenderWidget when it is hidden or restored. |
| 95 | virtual void WidgetHidden() = 0; |
| 96 | virtual void WidgetRestored() = 0; |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 97 | }; |
| 98 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 99 | // The RenderThread class represents a background thread where RenderView |
| 100 | // instances live. The RenderThread supports an API that is used by its |
| 101 | // consumer to talk indirectly to the RenderViews and supporting objects. |
| 102 | // 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] | 103 | // process (i.e., their corresponding TabContents). |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 104 | // |
| 105 | // Most of the communication occurs in the form of IPC messages. They are |
| 106 | // routed to the RenderThread according to the routing IDs of the messages. |
| 107 | // The routing IDs correspond to RenderView instances. |
[email protected] | 8d128d6 | 2011-09-13 22:11:57 | [diff] [blame] | 108 | class CONTENT_EXPORT RenderThread : public RenderThreadBase, |
| 109 | public ChildThread { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 110 | public: |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 111 | // Grabs the IPC channel name from the command line. |
| 112 | RenderThread(); |
| 113 | // Constructor that's used when running in single process mode. |
[email protected] | 11f485728 | 2009-11-13 19:56:17 | [diff] [blame] | 114 | explicit RenderThread(const std::string& channel_name); |
[email protected] | 8085dbc8 | 2008-09-26 22:53:44 | [diff] [blame] | 115 | virtual ~RenderThread(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 116 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 117 | // Returns the one render thread for this process. Note that this should only |
| 118 | // be accessed when running on the render thread itself |
[email protected] | 00c3961 | 2010-03-06 02:53:28 | [diff] [blame] | 119 | // |
| 120 | // TODO(brettw) this should be on the abstract base class instead of here, |
[email protected] | 2b7313f | 2011-09-28 20:54:08 | [diff] [blame] | 121 | // and return the base class' interface instead. See crbug.com/98375. |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 122 | static RenderThread* current(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 123 | |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 124 | // Returns the routing ID of the RenderWidget containing the current script |
| 125 | // execution context (corresponding to WebFrame::frameForCurrentContext). |
| 126 | static int32 RoutingIDForCurrentContext(); |
| 127 | |
[email protected] | 18ad677 | 2011-09-20 21:51:32 | [diff] [blame] | 128 | // Returns the locale string to be used in WebKit. |
| 129 | static std::string GetLocale(); |
| 130 | |
[email protected] | 4577622 | 2009-07-15 20:21:58 | [diff] [blame] | 131 | // Overridden from RenderThreadBase. |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 132 | virtual bool Send(IPC::Message* msg); |
| 133 | virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); |
| 134 | virtual void RemoveRoute(int32 routing_id); |
[email protected] | 81a3441 | 2009-01-05 19:17:24 | [diff] [blame] | 135 | virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); |
| 136 | virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 137 | virtual void WidgetHidden(); |
| 138 | virtual void WidgetRestored(); |
| 139 | |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 140 | void AddObserver(content::RenderProcessObserver* observer); |
| 141 | void RemoveObserver(content::RenderProcessObserver* observer); |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 142 | |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 143 | // These methods modify how the next message is sent. Normally, when sending |
| 144 | // a synchronous message that runs a nested message loop, we need to suspend |
| 145 | // callbacks into WebKit. This involves disabling timers and deferring |
| 146 | // resource loads. However, there are exceptions when we need to customize |
| 147 | // the behavior. |
| 148 | void DoNotSuspendWebKitSharedTimer(); |
| 149 | void DoNotNotifyWebKitOfModalLoop(); |
| 150 | |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame^] | 151 | CompositorThread* compositor_thread() const { |
| 152 | return compositor_thread_.get(); |
| 153 | } |
| 154 | |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 155 | AppCacheDispatcher* appcache_dispatcher() const { |
| 156 | return appcache_dispatcher_.get(); |
| 157 | } |
| 158 | |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 159 | IndexedDBDispatcher* indexed_db_dispatcher() const { |
| 160 | return indexed_db_dispatcher_.get(); |
| 161 | } |
| 162 | |
[email protected] | f7eb0a39 | 2011-07-12 10:19:51 | [diff] [blame] | 163 | AudioInputMessageFilter* audio_input_message_filter() { |
| 164 | return audio_input_message_filter_.get(); |
| 165 | } |
| 166 | |
| 167 | AudioMessageFilter* audio_message_filter() { |
| 168 | return audio_message_filter_.get(); |
| 169 | } |
| 170 | |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame] | 171 | VideoCaptureImplManager* video_capture_impl_manager() const { |
| 172 | return vc_manager_.get(); |
| 173 | } |
| 174 | |
[email protected] | b547fd4 | 2009-04-23 23:16:27 | [diff] [blame] | 175 | bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } |
| 176 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 177 | double idle_notification_delay_in_s() const { |
| 178 | return idle_notification_delay_in_s_; |
| 179 | } |
| 180 | void set_idle_notification_delay_in_s(double idle_notification_delay_in_s) { |
[email protected] | d07495f | 2011-03-29 17:41:28 | [diff] [blame] | 181 | idle_notification_delay_in_s_ = idle_notification_delay_in_s; |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 182 | } |
| 183 | |
[email protected] | 3bf4d53 | 2010-03-27 00:23:34 | [diff] [blame] | 184 | // Synchronously establish a channel to the GPU plugin if not previously |
| 185 | // established or if it has been lost (for example if the GPU plugin crashed). |
| 186 | // If there is a pending asynchronous request, it will be completed by the |
| 187 | // time this routine returns. |
[email protected] | 7f3a2cf | 2011-04-06 00:10:50 | [diff] [blame] | 188 | GpuChannelHost* EstablishGpuChannelSync(content::CauseForGpuLaunch); |
[email protected] | 3bf4d53 | 2010-03-27 00:23:34 | [diff] [blame] | 189 | |
[email protected] | 6217d39 | 2010-03-25 22:08:35 | [diff] [blame] | 190 | // Get the GPU channel. Returns NULL if the channel is not established or |
| 191 | // has been lost. |
| 192 | GpuChannelHost* GetGpuChannel(); |
| 193 | |
[email protected] | c6a7b86 | 2010-08-20 22:19:38 | [diff] [blame] | 194 | // Returns a MessageLoopProxy instance corresponding to the message loop |
| 195 | // of the thread on which file operations should be run. Must be called |
| 196 | // on the renderer's main thread. |
| 197 | scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy(); |
| 198 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 199 | // Schedule a call to IdleHandler with the given initial delay. |
| 200 | void ScheduleIdleHandler(double initial_delay_s); |
| 201 | |
| 202 | // A task we invoke periodically to assist with idle cleanup. |
| 203 | void IdleHandler(); |
| 204 | |
| 205 | // Registers the given V8 extension with WebKit. |
| 206 | void RegisterExtension(v8::Extension* extension); |
| 207 | |
[email protected] | c6e27b9 | 2011-04-30 17:03:43 | [diff] [blame] | 208 | // Returns true iff the extension is registered. |
| 209 | bool IsRegisteredExtension(const std::string& v8_extension_name) const; |
| 210 | |
[email protected] | d1b8fccc | 2011-08-03 01:20:13 | [diff] [blame] | 211 | // We initialize WebKit as late as possible. |
| 212 | void EnsureWebKitInitialized(); |
| 213 | |
[email protected] | 4a7d639 | 2011-09-19 20:55:08 | [diff] [blame] | 214 | // Helper function to send over a string to be recorded by user metrics |
| 215 | static void RecordUserMetrics(const std::string& action); |
| 216 | |
| 217 | #if defined(OS_WIN) |
| 218 | // Request that the given font be loaded by the browser so it's cached by the |
| 219 | // OS. Please see ChildProcessHost::PreCacheFont for details. |
| 220 | static bool PreCacheFont(const LOGFONT& log_font); |
[email protected] | 79fff82 | 2011-09-20 03:33:21 | [diff] [blame] | 221 | |
| 222 | // Release cached font. |
| 223 | static bool ReleaseCachedFonts(); |
[email protected] | 4a7d639 | 2011-09-19 20:55:08 | [diff] [blame] | 224 | #endif // OS_WIN |
| 225 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 226 | private: |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 227 | virtual bool OnControlMessageReceived(const IPC::Message& msg); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 228 | |
[email protected] | 42f1d782 | 2009-07-23 18:17:55 | [diff] [blame] | 229 | void Init(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 230 | |
[email protected] | b75b829 | 2010-10-01 07:28:25 | [diff] [blame] | 231 | void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level); |
[email protected] | 56879f93 | 2010-12-13 21:05:37 | [diff] [blame] | 232 | void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 233 | void OnSetNextPageID(int32 next_page_id); |
[email protected] | b9ab10c | 2009-08-07 18:09:55 | [diff] [blame] | 234 | void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); |
[email protected] | 4e6419c | 2010-01-15 04:50:34 | [diff] [blame] | 235 | void OnCreateNewView(const ViewMsg_New_Params& params); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 236 | void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
[email protected] | b78e168b | 2009-09-21 22:05:45 | [diff] [blame] | 237 | void OnPurgePluginListCache(bool reload_pages); |
[email protected] | 6eac57a | 2011-07-12 21:15:09 | [diff] [blame] | 238 | void OnNetworkStateChanged(bool online); |
[email protected] | b3df5a4 | 2010-05-11 14:31:09 | [diff] [blame] | 239 | void OnGetAccessibilityTree(); |
| 240 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 241 | // These objects live solely on the render thread. |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 242 | scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 243 | scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 244 | scoped_ptr<IndexedDBDispatcher> indexed_db_dispatcher_; |
[email protected] | 8d6cba4 | 2011-09-02 10:05:19 | [diff] [blame] | 245 | scoped_ptr<RendererWebKitPlatformSupportImpl> webkit_platform_support_; |
[email protected] | b7c7bcf | 2009-10-03 07:07:34 | [diff] [blame] | 246 | scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_; |
[email protected] | 9291ed1 | 2009-07-23 17:33:22 | [diff] [blame] | 247 | |
[email protected] | e2b2d4a | 2009-10-24 03:32:59 | [diff] [blame] | 248 | // Used on the renderer and IPC threads. |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 249 | scoped_refptr<DBMessageFilter> db_message_filter_; |
[email protected] | f7eb0a39 | 2011-07-12 10:19:51 | [diff] [blame] | 250 | scoped_refptr<AudioInputMessageFilter> audio_input_message_filter_; |
| 251 | scoped_refptr<AudioMessageFilter> audio_message_filter_; |
[email protected] | 8262245 | 2011-07-22 09:57:20 | [diff] [blame] | 252 | scoped_refptr<DevToolsAgentFilter> devtools_agent_message_filter_; |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 253 | |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame] | 254 | // Used on multiple threads. |
| 255 | scoped_refptr<VideoCaptureImplManager> vc_manager_; |
| 256 | |
[email protected] | 1d4dbde | 2011-04-01 20:40:35 | [diff] [blame] | 257 | // Used on multiple script execution context threads. |
| 258 | scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; |
| 259 | |
[email protected] | b547fd4 | 2009-04-23 23:16:27 | [diff] [blame] | 260 | // If true, then a GetPlugins call is allowed to rescan the disk. |
| 261 | bool plugin_refresh_allowed_; |
| 262 | |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 263 | // The count of RenderWidgets running through this thread. |
| 264 | int widget_count_; |
| 265 | |
| 266 | // The count of hidden RenderWidgets running through this thread. |
| 267 | int hidden_widget_count_; |
| 268 | |
| 269 | // The current value of the idle notification timer delay. |
| 270 | double idle_notification_delay_in_s_; |
| 271 | |
[email protected] | 80fc08c5 | 2010-03-09 07:43:50 | [diff] [blame] | 272 | bool suspend_webkit_shared_timer_; |
| 273 | bool notify_webkit_of_modal_loop_; |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 274 | |
[email protected] | 71d6d85 | 2009-12-07 22:12:36 | [diff] [blame] | 275 | // Timer that periodically calls IdleHandler. |
| 276 | base::RepeatingTimer<RenderThread> idle_timer_; |
| 277 | |
[email protected] | 6217d39 | 2010-03-25 22:08:35 | [diff] [blame] | 278 | // The channel from the renderer process to the GPU process. |
| 279 | scoped_refptr<GpuChannelHost> gpu_channel_; |
| 280 | |
[email protected] | c6a7b86 | 2010-08-20 22:19:38 | [diff] [blame] | 281 | // A lazily initiated thread on which file operations are run. |
| 282 | scoped_ptr<base::Thread> file_thread_; |
| 283 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 284 | // Map of registered v8 extensions. The key is the extension name. |
| 285 | std::set<std::string> v8_extensions_; |
[email protected] | 2a521c5 | 2011-01-26 18:45:21 | [diff] [blame] | 286 | |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame^] | 287 | scoped_ptr<CompositorThread> compositor_thread_; |
| 288 | |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 289 | ObserverList<content::RenderProcessObserver> observers_; |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 290 | |
[email protected] | 1bc8306 | 2009-02-06 00:16:37 | [diff] [blame] | 291 | DISALLOW_COPY_AND_ASSIGN(RenderThread); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 292 | }; |
| 293 | |
[email protected] | 10e6ab57 | 2011-04-14 23:42:00 | [diff] [blame] | 294 | #endif // CONTENT_RENDERER_RENDER_THREAD_H_ |