[email protected] | d3d6325d | 2012-01-03 21:17:36 | [diff] [blame] | 1 | // Copyright (c) 2012 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] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 5 | #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| 6 | #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 7 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 8 | #include <set> |
[email protected] | b68d5ed | 2009-04-16 02:41:28 | [diff] [blame] | 9 | #include <string> |
[email protected] | 1bc8306 | 2009-02-06 00:16:37 | [diff] [blame] | 10 | #include <vector> |
| 11 | |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 12 | #include "base/observer_list.h" |
[email protected] | 71d6d85 | 2009-12-07 22:12:36 | [diff] [blame] | 13 | #include "base/time.h" |
| 14 | #include "base/timer.h" |
[email protected] | 037fce0 | 2009-01-22 01:42:15 | [diff] [blame] | 15 | #include "build/build_config.h" |
[email protected] | b3e83de | 2012-02-07 03:33:28 | [diff] [blame] | 16 | #include "content/common/child_process.h" |
[email protected] | 7ef40ffe1 | 2011-03-08 05:05:28 | [diff] [blame] | 17 | #include "content/common/child_thread.h" |
[email protected] | 8d128d6 | 2011-09-13 22:11:57 | [diff] [blame] | 18 | #include "content/common/content_export.h" |
[email protected] | 778574e | 2011-03-21 22:03:50 | [diff] [blame] | 19 | #include "content/common/css_colors.h" |
[email protected] | c26ad88 | 2012-02-07 06:41:20 | [diff] [blame] | 20 | #include "content/common/gpu/client/gpu_channel_host.h" |
[email protected] | 202b54ff | 2011-04-22 21:36:38 | [diff] [blame] | 21 | #include "content/common/gpu/gpu_process_launch_causes.h" |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 22 | #include "content/public/renderer/render_thread.h" |
[email protected] | a83d4229 | 2010-08-17 22:51:10 | [diff] [blame] | 23 | #include "ipc/ipc_channel_proxy.h" |
[email protected] | 08397d5 | 2011-02-05 01:53:38 | [diff] [blame] | 24 | #include "ui/gfx/native_widget_types.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 25 | |
[email protected] | 1edc16b8 | 2009-04-07 17:45:54 | [diff] [blame] | 26 | class AppCacheDispatcher; |
[email protected] | f7eb0a39 | 2011-07-12 10:19:51 | [diff] [blame] | 27 | class AudioInputMessageFilter; |
| 28 | class AudioMessageFilter; |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame] | 29 | class CompositorThread; |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 30 | class DBMessageFilter; |
[email protected] | 8262245 | 2011-07-22 09:57:20 | [diff] [blame] | 31 | class DevToolsAgentFilter; |
[email protected] | 1910fe8 | 2012-05-10 00:04:10 | [diff] [blame] | 32 | class DomStorageDispatcher; |
[email protected] | e13ad79b | 2010-07-22 21:36:50 | [diff] [blame] | 33 | class GpuChannelHost; |
[email protected] | 70c19a93 | 2010-05-14 12:59:11 | [diff] [blame] | 34 | class IndexedDBDispatcher; |
[email protected] | 8d6cba4 | 2011-09-02 10:05:19 | [diff] [blame] | 35 | class RendererWebKitPlatformSupportImpl; |
[email protected] | 39008c0 | 2009-02-11 23:59:25 | [diff] [blame] | 36 | class SkBitmap; |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame] | 37 | class VideoCaptureImplManager; |
[email protected] | 4e6419c | 2010-01-15 04:50:34 | [diff] [blame] | 38 | struct ViewMsg_New_Params; |
[email protected] | 83f93d3 | 2011-11-11 00:43:30 | [diff] [blame] | 39 | class WebDatabaseObserverImpl; |
[email protected] | 3b2afc3 | 2012-06-18 21:31:16 | [diff] [blame] | 40 | class WebGraphicsContext3DCommandBufferImpl; |
[email protected] | 46f36a49 | 2010-07-28 19:36:41 | [diff] [blame] | 41 | |
[email protected] | b7c7bcf | 2009-10-03 07:07:34 | [diff] [blame] | 42 | namespace WebKit { |
[email protected] | d8cd837 | 2012-03-09 10:49:51 | [diff] [blame] | 43 | class WebMediaStreamCenter; |
| 44 | class WebMediaStreamCenterClient; |
[email protected] | b7c7bcf | 2009-10-03 07:07:34 | [diff] [blame] | 45 | } |
| 46 | |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 47 | namespace base { |
| 48 | class MessageLoopProxy; |
| 49 | class Thread; |
[email protected] | 1a77126 | 2011-10-31 09:11:12 | [diff] [blame] | 50 | namespace win { |
| 51 | class ScopedCOMInitializer; |
| 52 | } |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | namespace content { |
[email protected] | 3958e97 | 2012-07-17 00:25:41 | [diff] [blame] | 56 | class AudioRendererMixerManager; |
[email protected] | 468e490 | 2012-05-23 01:49:31 | [diff] [blame] | 57 | class BrowserPluginChannelManager; |
| 58 | class BrowserPluginRegistry; |
[email protected] | d8cd837 | 2012-03-09 10:49:51 | [diff] [blame] | 59 | class MediaStreamCenter; |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 60 | class RenderProcessObserver; |
| 61 | } |
| 62 | |
[email protected] | af7eb3fb | 2010-09-23 21:31:06 | [diff] [blame] | 63 | namespace v8 { |
| 64 | class Extension; |
| 65 | } |
| 66 | |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 67 | // The RenderThreadImpl class represents a background thread where RenderView |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 68 | // instances live. The RenderThread supports an API that is used by its |
| 69 | // consumer to talk indirectly to the RenderViews and supporting objects. |
| 70 | // Likewise, it provides an API for the RenderViews to talk back to the main |
[email protected] | 770005b | 2012-04-16 15:58:13 | [diff] [blame] | 71 | // process (i.e., their corresponding WebContentsImpl). |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 72 | // |
| 73 | // Most of the communication occurs in the form of IPC messages. They are |
| 74 | // routed to the RenderThread according to the routing IDs of the messages. |
| 75 | // The routing IDs correspond to RenderView instances. |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 76 | class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, |
[email protected] | b3e83de | 2012-02-07 03:33:28 | [diff] [blame] | 77 | public ChildThread, |
| 78 | public GpuChannelHostFactory { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 79 | public: |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 80 | static RenderThreadImpl* current(); |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 81 | |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 82 | RenderThreadImpl(); |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 83 | // Constructor that's used when running in single process mode. |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 84 | explicit RenderThreadImpl(const std::string& channel_name); |
| 85 | virtual ~RenderThreadImpl(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 86 | |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 87 | // Returns the routing ID of the RenderWidget containing the current script |
| 88 | // execution context (corresponding to WebFrame::frameForCurrentContext). |
| 89 | static int32 RoutingIDForCurrentContext(); |
| 90 | |
[email protected] | 58436a1 | 2012-03-21 17:10:26 | [diff] [blame] | 91 | // When initializing WebKit, ensure that any schemes needed for the content |
| 92 | // module are registered properly. Static to allow sharing with tests. |
| 93 | static void RegisterSchemes(); |
| 94 | |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 95 | // content::RenderThread implementation: |
| 96 | virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 97 | virtual MessageLoop* GetMessageLoop() OVERRIDE; |
| 98 | virtual IPC::SyncChannel* GetChannel() OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 99 | virtual std::string GetLocale() OVERRIDE; |
[email protected] | 07bb633 | 2012-01-21 01:07:57 | [diff] [blame] | 100 | virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE; |
[email protected] | 96191d5 | 2012-05-17 01:37:11 | [diff] [blame] | 101 | virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() |
| 102 | OVERRIDE; |
[email protected] | c47317e | 2012-06-20 22:35:31 | [diff] [blame] | 103 | virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 104 | virtual void RemoveRoute(int32 routing_id) OVERRIDE; |
[email protected] | 77fc9b9 | 2011-10-15 16:20:37 | [diff] [blame] | 105 | virtual int GenerateRoutingID() OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 106 | virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; |
| 107 | virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; |
| 108 | virtual void SetOutgoingMessageFilter( |
| 109 | IPC::ChannelProxy::OutgoingMessageFilter* filter) OVERRIDE; |
| 110 | virtual void AddObserver(content::RenderProcessObserver* observer) OVERRIDE; |
| 111 | virtual void RemoveObserver( |
| 112 | content::RenderProcessObserver* observer) OVERRIDE; |
[email protected] | 359dfa3 | 2011-10-12 01:10:15 | [diff] [blame] | 113 | virtual void SetResourceDispatcherDelegate( |
| 114 | content::ResourceDispatcherDelegate* delegate) OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 115 | virtual void WidgetHidden() OVERRIDE; |
| 116 | virtual void WidgetRestored() OVERRIDE; |
| 117 | virtual void EnsureWebKitInitialized() OVERRIDE; |
| 118 | virtual void RecordUserMetrics(const std::string& action) OVERRIDE; |
[email protected] | 00614a8 | 2011-10-07 22:39:31 | [diff] [blame] | 119 | virtual base::SharedMemoryHandle HostAllocateSharedMemoryBuffer( |
| 120 | uint32 buffer_size) OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 121 | virtual void RegisterExtension(v8::Extension* extension) OVERRIDE; |
| 122 | virtual bool IsRegisteredExtension( |
| 123 | const std::string& v8_extension_name) const OVERRIDE; |
[email protected] | 6593ae1 | 2011-11-14 12:09:44 | [diff] [blame] | 124 | virtual void ScheduleIdleHandler(int64 initial_delay_ms) OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 125 | virtual void IdleHandler() OVERRIDE; |
[email protected] | 6593ae1 | 2011-11-14 12:09:44 | [diff] [blame] | 126 | virtual int64 GetIdleNotificationDelayInMs() const OVERRIDE; |
| 127 | virtual void SetIdleNotificationDelayInMs( |
| 128 | int64 idle_notification_delay_in_ms) OVERRIDE; |
[email protected] | a1a7ff3 | 2012-07-19 14:03:51 | [diff] [blame^] | 129 | virtual void ToggleWebKitSharedTimer(bool suspend) OVERRIDE; |
| 130 | virtual void UpdateHistograms(int sequence_number) OVERRIDE; |
[email protected] | 52647690 | 2011-10-06 20:34:06 | [diff] [blame] | 131 | #if defined(OS_WIN) |
| 132 | virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE; |
| 133 | virtual void ReleaseCachedFonts() OVERRIDE; |
| 134 | #endif |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 135 | |
[email protected] | 988aacf | 2012-02-12 18:10:03 | [diff] [blame] | 136 | // content::ChildThread: |
| 137 | virtual bool IsWebFrameValid(WebKit::WebFrame* frame) OVERRIDE; |
| 138 | |
[email protected] | b3e83de | 2012-02-07 03:33:28 | [diff] [blame] | 139 | // GpuChannelHostFactory implementation: |
| 140 | virtual bool IsMainThread() OVERRIDE; |
| 141 | virtual bool IsIOThread() OVERRIDE; |
| 142 | virtual MessageLoop* GetMainLoop() OVERRIDE; |
[email protected] | 5b040e59 | 2012-02-10 02:56:10 | [diff] [blame] | 143 | virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; |
[email protected] | b3e83de | 2012-02-07 03:33:28 | [diff] [blame] | 144 | virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE; |
| 145 | virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( |
| 146 | uint32 size) OVERRIDE; |
| 147 | virtual int32 CreateViewCommandBuffer( |
| 148 | int32 surface_id, |
| 149 | const GPUCreateCommandBufferConfig& init_params) OVERRIDE; |
| 150 | |
| 151 | // Synchronously establish a channel to the GPU plugin if not previously |
| 152 | // established or if it has been lost (for example if the GPU plugin crashed). |
| 153 | // If there is a pending asynchronous request, it will be completed by the |
| 154 | // time this routine returns. |
| 155 | virtual GpuChannelHost* EstablishGpuChannelSync( |
| 156 | content::CauseForGpuLaunch) OVERRIDE; |
| 157 | |
| 158 | |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 159 | // These methods modify how the next message is sent. Normally, when sending |
| 160 | // a synchronous message that runs a nested message loop, we need to suspend |
| 161 | // callbacks into WebKit. This involves disabling timers and deferring |
| 162 | // resource loads. However, there are exceptions when we need to customize |
| 163 | // the behavior. |
| 164 | void DoNotSuspendWebKitSharedTimer(); |
| 165 | void DoNotNotifyWebKitOfModalLoop(); |
| 166 | |
[email protected] | f315017 | 2011-10-22 02:28:45 | [diff] [blame] | 167 | // Will be NULL if threaded compositing has not been enabled. |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame] | 168 | CompositorThread* compositor_thread() const { |
| 169 | return compositor_thread_.get(); |
| 170 | } |
| 171 | |
[email protected] | 468e490 | 2012-05-23 01:49:31 | [diff] [blame] | 172 | content::BrowserPluginRegistry* browser_plugin_registry() const { |
| 173 | return browser_plugin_registry_.get(); |
| 174 | } |
| 175 | |
| 176 | content::BrowserPluginChannelManager* browser_plugin_channel_manager() const { |
| 177 | return browser_plugin_channel_manager_.get(); |
| 178 | } |
| 179 | |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 180 | AppCacheDispatcher* appcache_dispatcher() const { |
| 181 | return appcache_dispatcher_.get(); |
| 182 | } |
| 183 | |
[email protected] | 19b4951 | 2012-05-30 19:22:09 | [diff] [blame] | 184 | DomStorageDispatcher* dom_storage_dispatcher() const { |
| 185 | return dom_storage_dispatcher_.get(); |
| 186 | } |
| 187 | |
[email protected] | f7eb0a39 | 2011-07-12 10:19:51 | [diff] [blame] | 188 | AudioInputMessageFilter* audio_input_message_filter() { |
| 189 | return audio_input_message_filter_.get(); |
| 190 | } |
| 191 | |
| 192 | AudioMessageFilter* audio_message_filter() { |
| 193 | return audio_message_filter_.get(); |
| 194 | } |
| 195 | |
[email protected] | d8cd837 | 2012-03-09 10:49:51 | [diff] [blame] | 196 | // Creates the embedder implementation of WebMediaStreamCenter. |
| 197 | // The resulting object is owned by WebKit and deleted by WebKit at tear-down. |
| 198 | WebKit::WebMediaStreamCenter* CreateMediaStreamCenter( |
| 199 | WebKit::WebMediaStreamCenterClient* client); |
| 200 | |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame] | 201 | VideoCaptureImplManager* video_capture_impl_manager() const { |
| 202 | return vc_manager_.get(); |
| 203 | } |
| 204 | |
[email protected] | b547fd4 | 2009-04-23 23:16:27 | [diff] [blame] | 205 | bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } |
| 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] | 1784b2f | 2011-11-24 10:53:48 | [diff] [blame] | 216 | // Causes the idle handler to skip sending idle notifications |
| 217 | // on the two next scheduled calls, so idle notifications are |
| 218 | // not sent for at least one notification delay. |
| 219 | void PostponeIdleNotification(); |
| 220 | |
[email protected] | 3b2afc3 | 2012-06-18 21:31:16 | [diff] [blame] | 221 | // Returns a graphics context shared among all |
| 222 | // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned |
| 223 | // by this class and must be null-tested before each use to detect context |
| 224 | // loss. The returned WeakPtr<> is only valid on the compositor thread when |
| 225 | // threaded compositing is enabled. |
| 226 | base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> GetGpuVDAContext3D(); |
| 227 | |
[email protected] | 3958e97 | 2012-07-17 00:25:41 | [diff] [blame] | 228 | // AudioRendererMixerManager instance which manages renderer side mixer |
| 229 | // instances shared based on configured audio parameters. Lazily created on |
| 230 | // first call. |
| 231 | content::AudioRendererMixerManager* GetAudioRendererMixerManager(); |
| 232 | |
[email protected] | 8930d47 | 2009-02-21 08:05:28 | [diff] [blame] | 233 | private: |
[email protected] | edc64de | 2011-11-17 20:07:38 | [diff] [blame] | 234 | virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 235 | |
[email protected] | 42f1d782 | 2009-07-23 18:17:55 | [diff] [blame] | 236 | void Init(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 237 | |
[email protected] | 4e2a25a | 2012-01-27 00:42:08 | [diff] [blame] | 238 | void OnSetZoomLevelForCurrentURL(const std::string& host, double zoom_level); |
[email protected] | b9ab10c | 2009-08-07 18:09:55 | [diff] [blame] | 239 | void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); |
[email protected] | 4e6419c | 2010-01-15 04:50:34 | [diff] [blame] | 240 | void OnCreateNewView(const ViewMsg_New_Params& params); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 241 | void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
[email protected] | b78e168b | 2009-09-21 22:05:45 | [diff] [blame] | 242 | void OnPurgePluginListCache(bool reload_pages); |
[email protected] | 6eac57a | 2011-07-12 21:15:09 | [diff] [blame] | 243 | void OnNetworkStateChanged(bool online); |
[email protected] | b3df5a4 | 2010-05-11 14:31:09 | [diff] [blame] | 244 | void OnGetAccessibilityTree(); |
[email protected] | b69934e | 2011-10-29 02:51:52 | [diff] [blame] | 245 | void OnTempCrashWithData(const GURL& data); |
[email protected] | b3df5a4 | 2010-05-11 14:31:09 | [diff] [blame] | 246 | |
[email protected] | 1784b2f | 2011-11-24 10:53:48 | [diff] [blame] | 247 | void IdleHandlerInForegroundTab(); |
| 248 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 249 | // These objects live solely on the render thread. |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 250 | scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; |
[email protected] | 1910fe8 | 2012-05-10 00:04:10 | [diff] [blame] | 251 | scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_; |
[email protected] | 31bfae7 | 2011-12-16 02:04:38 | [diff] [blame] | 252 | scoped_ptr<IndexedDBDispatcher> main_thread_indexed_db_dispatcher_; |
[email protected] | 8d6cba4 | 2011-09-02 10:05:19 | [diff] [blame] | 253 | scoped_ptr<RendererWebKitPlatformSupportImpl> webkit_platform_support_; |
[email protected] | 468e490 | 2012-05-23 01:49:31 | [diff] [blame] | 254 | scoped_ptr<content::BrowserPluginChannelManager> |
| 255 | browser_plugin_channel_manager_; |
[email protected] | 9291ed1 | 2009-07-23 17:33:22 | [diff] [blame] | 256 | |
[email protected] | d8cd837 | 2012-03-09 10:49:51 | [diff] [blame] | 257 | // Used on the render thread and deleted by WebKit at shutdown. |
| 258 | content::MediaStreamCenter* media_stream_center_; |
| 259 | |
[email protected] | e2b2d4a | 2009-10-24 03:32:59 | [diff] [blame] | 260 | // Used on the renderer and IPC threads. |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 261 | scoped_refptr<DBMessageFilter> db_message_filter_; |
[email protected] | f7eb0a39 | 2011-07-12 10:19:51 | [diff] [blame] | 262 | scoped_refptr<AudioInputMessageFilter> audio_input_message_filter_; |
| 263 | scoped_refptr<AudioMessageFilter> audio_message_filter_; |
[email protected] | 8262245 | 2011-07-22 09:57:20 | [diff] [blame] | 264 | scoped_refptr<DevToolsAgentFilter> devtools_agent_message_filter_; |
[email protected] | 017022b | 2009-07-27 23:06:34 | [diff] [blame] | 265 | |
[email protected] | 80b161a | 2011-06-27 17:42:11 | [diff] [blame] | 266 | // Used on multiple threads. |
| 267 | scoped_refptr<VideoCaptureImplManager> vc_manager_; |
| 268 | |
[email protected] | 1d4dbde | 2011-04-01 20:40:35 | [diff] [blame] | 269 | // Used on multiple script execution context threads. |
| 270 | scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; |
| 271 | |
[email protected] | 1a77126 | 2011-10-31 09:11:12 | [diff] [blame] | 272 | // Initialize COM when using plugins outside the sandbox (Windows only). |
| 273 | scoped_ptr<base::win::ScopedCOMInitializer> initialize_com_; |
| 274 | |
[email protected] | b547fd4 | 2009-04-23 23:16:27 | [diff] [blame] | 275 | // If true, then a GetPlugins call is allowed to rescan the disk. |
| 276 | bool plugin_refresh_allowed_; |
| 277 | |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 278 | // The count of RenderWidgets running through this thread. |
| 279 | int widget_count_; |
| 280 | |
| 281 | // The count of hidden RenderWidgets running through this thread. |
| 282 | int hidden_widget_count_; |
| 283 | |
| 284 | // The current value of the idle notification timer delay. |
[email protected] | 6593ae1 | 2011-11-14 12:09:44 | [diff] [blame] | 285 | int64 idle_notification_delay_in_ms_; |
[email protected] | bee16aab | 2009-08-26 15:55:03 | [diff] [blame] | 286 | |
[email protected] | 1784b2f | 2011-11-24 10:53:48 | [diff] [blame] | 287 | // The number of idle handler calls that skip sending idle notifications. |
| 288 | int idle_notifications_to_skip_; |
| 289 | |
[email protected] | 80fc08c5 | 2010-03-09 07:43:50 | [diff] [blame] | 290 | bool suspend_webkit_shared_timer_; |
| 291 | bool notify_webkit_of_modal_loop_; |
[email protected] | c1f50aa | 2010-02-18 03:46:57 | [diff] [blame] | 292 | |
[email protected] | 71d6d85 | 2009-12-07 22:12:36 | [diff] [blame] | 293 | // Timer that periodically calls IdleHandler. |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 294 | base::RepeatingTimer<RenderThreadImpl> idle_timer_; |
[email protected] | 71d6d85 | 2009-12-07 22:12:36 | [diff] [blame] | 295 | |
[email protected] | 6217d39 | 2010-03-25 22:08:35 | [diff] [blame] | 296 | // The channel from the renderer process to the GPU process. |
| 297 | scoped_refptr<GpuChannelHost> gpu_channel_; |
| 298 | |
[email protected] | c6a7b86 | 2010-08-20 22:19:38 | [diff] [blame] | 299 | // A lazily initiated thread on which file operations are run. |
| 300 | scoped_ptr<base::Thread> file_thread_; |
| 301 | |
[email protected] | 6779aa1 | 2011-03-29 17:32:24 | [diff] [blame] | 302 | // Map of registered v8 extensions. The key is the extension name. |
| 303 | std::set<std::string> v8_extensions_; |
[email protected] | 2a521c5 | 2011-01-26 18:45:21 | [diff] [blame] | 304 | |
[email protected] | 2db58cf9 | 2011-12-01 21:39:01 | [diff] [blame] | 305 | bool compositor_initialized_; |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame] | 306 | scoped_ptr<CompositorThread> compositor_thread_; |
[email protected] | 468e490 | 2012-05-23 01:49:31 | [diff] [blame] | 307 | scoped_ptr<content::BrowserPluginRegistry> browser_plugin_registry_; |
[email protected] | a9fb30aa | 2011-10-06 06:58:46 | [diff] [blame] | 308 | |
[email protected] | 64ffa044 | 2011-10-03 22:08:36 | [diff] [blame] | 309 | ObserverList<content::RenderProcessObserver> observers_; |
[email protected] | 1223d6ef | 2011-03-28 16:47:50 | [diff] [blame] | 310 | |
[email protected] | 3b2afc3 | 2012-06-18 21:31:16 | [diff] [blame] | 311 | scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_; |
| 312 | |
[email protected] | 3958e97 | 2012-07-17 00:25:41 | [diff] [blame] | 313 | scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_; |
| 314 | |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 315 | DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 316 | }; |
| 317 | |
[email protected] | f1a29a0 | 2011-10-06 23:08:44 | [diff] [blame] | 318 | #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |