blob: 77773a1d36e17985b47d564bdcb1e4757973d4fa [file] [log] [blame]
[email protected]d3d6325d2012-01-03 21:17:361// Copyright (c) 2012 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]f1a29a02011-10-06 23:08:445#ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6#define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
initial.commit09911bf2008-07-26 23:55:297
[email protected]6779aa12011-03-29 17:32:248#include <set>
[email protected]b68d5ed2009-04-16 02:41:289#include <string>
[email protected]1bc83062009-02-06 00:16:3710#include <vector>
11
[email protected]1223d6ef2011-03-28 16:47:5012#include "base/observer_list.h"
[email protected]71d6d852009-12-07 22:12:3613#include "base/time.h"
14#include "base/timer.h"
[email protected]037fce02009-01-22 01:42:1515#include "build/build_config.h"
[email protected]b3e83de2012-02-07 03:33:2816#include "content/common/child_process.h"
[email protected]7ef40ffe12011-03-08 05:05:2817#include "content/common/child_thread.h"
[email protected]8d128d62011-09-13 22:11:5718#include "content/common/content_export.h"
[email protected]778574e2011-03-21 22:03:5019#include "content/common/css_colors.h"
[email protected]c26ad882012-02-07 06:41:2020#include "content/common/gpu/client/gpu_channel_host.h"
[email protected]202b54ff2011-04-22 21:36:3821#include "content/common/gpu/gpu_process_launch_causes.h"
[email protected]526476902011-10-06 20:34:0622#include "content/public/renderer/render_thread.h"
[email protected]a83d42292010-08-17 22:51:1023#include "ipc/ipc_channel_proxy.h"
[email protected]08397d52011-02-05 01:53:3824#include "ui/gfx/native_widget_types.h"
initial.commit09911bf2008-07-26 23:55:2925
[email protected]1edc16b82009-04-07 17:45:5426class AppCacheDispatcher;
[email protected]f7eb0a392011-07-12 10:19:5127class AudioInputMessageFilter;
28class AudioMessageFilter;
[email protected]a9fb30aa2011-10-06 06:58:4629class CompositorThread;
[email protected]017022b2009-07-27 23:06:3430class DBMessageFilter;
[email protected]82622452011-07-22 09:57:2031class DevToolsAgentFilter;
[email protected]1910fe82012-05-10 00:04:1032class DomStorageDispatcher;
[email protected]e13ad79b2010-07-22 21:36:5033class GpuChannelHost;
[email protected]70c19a932010-05-14 12:59:1134class IndexedDBDispatcher;
[email protected]8d6cba42011-09-02 10:05:1935class RendererWebKitPlatformSupportImpl;
[email protected]39008c02009-02-11 23:59:2536class SkBitmap;
[email protected]80b161a2011-06-27 17:42:1137class VideoCaptureImplManager;
[email protected]4e6419c2010-01-15 04:50:3438struct ViewMsg_New_Params;
[email protected]83f93d32011-11-11 00:43:3039class WebDatabaseObserverImpl;
[email protected]3b2afc32012-06-18 21:31:1640class WebGraphicsContext3DCommandBufferImpl;
[email protected]46f36a492010-07-28 19:36:4141
[email protected]b7c7bcf2009-10-03 07:07:3442namespace WebKit {
[email protected]d8cd8372012-03-09 10:49:5143class WebMediaStreamCenter;
44class WebMediaStreamCenterClient;
[email protected]b7c7bcf2009-10-03 07:07:3445}
46
[email protected]64ffa0442011-10-03 22:08:3647namespace base {
48class MessageLoopProxy;
49class Thread;
[email protected]1a771262011-10-31 09:11:1250namespace win {
51class ScopedCOMInitializer;
52}
[email protected]64ffa0442011-10-03 22:08:3653}
54
[email protected]1842fe22012-08-13 23:24:3555namespace IPC {
56class ForwardingMessageFilter;
57}
58
[email protected]64ffa0442011-10-03 22:08:3659namespace content {
[email protected]3958e972012-07-17 00:25:4160class AudioRendererMixerManager;
[email protected]d8cd8372012-03-09 10:49:5161class MediaStreamCenter;
[email protected]4761cf12012-09-12 10:37:5562class P2PSocketDispatcher;
[email protected]64ffa0442011-10-03 22:08:3663class RenderProcessObserver;
[email protected]cb25aa12012-08-07 19:13:4364
65namespace old {
66class BrowserPluginChannelManager;
67class BrowserPluginRegistry;
68}
69
[email protected]64ffa0442011-10-03 22:08:3670}
71
[email protected]af7eb3fb2010-09-23 21:31:0672namespace v8 {
73class Extension;
74}
75
[email protected]f1a29a02011-10-06 23:08:4476// The RenderThreadImpl class represents a background thread where RenderView
initial.commit09911bf2008-07-26 23:55:2977// instances live. The RenderThread supports an API that is used by its
78// consumer to talk indirectly to the RenderViews and supporting objects.
79// Likewise, it provides an API for the RenderViews to talk back to the main
[email protected]770005b2012-04-16 15:58:1380// process (i.e., their corresponding WebContentsImpl).
initial.commit09911bf2008-07-26 23:55:2981//
82// Most of the communication occurs in the form of IPC messages. They are
83// routed to the RenderThread according to the routing IDs of the messages.
84// The routing IDs correspond to RenderView instances.
[email protected]f1a29a02011-10-06 23:08:4485class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread,
[email protected]b3e83de2012-02-07 03:33:2886 public ChildThread,
87 public GpuChannelHostFactory {
initial.commit09911bf2008-07-26 23:55:2988 public:
[email protected]f1a29a02011-10-06 23:08:4489 static RenderThreadImpl* current();
[email protected]526476902011-10-06 20:34:0690
[email protected]f1a29a02011-10-06 23:08:4491 RenderThreadImpl();
[email protected]8930d472009-02-21 08:05:2892 // Constructor that's used when running in single process mode.
[email protected]f1a29a02011-10-06 23:08:4493 explicit RenderThreadImpl(const std::string& channel_name);
94 virtual ~RenderThreadImpl();
initial.commit09911bf2008-07-26 23:55:2995
[email protected]58436a12012-03-21 17:10:2696 // When initializing WebKit, ensure that any schemes needed for the content
97 // module are registered properly. Static to allow sharing with tests.
98 static void RegisterSchemes();
99
[email protected]526476902011-10-06 20:34:06100 // content::RenderThread implementation:
101 virtual bool Send(IPC::Message* msg) OVERRIDE;
102 virtual MessageLoop* GetMessageLoop() OVERRIDE;
103 virtual IPC::SyncChannel* GetChannel() OVERRIDE;
[email protected]526476902011-10-06 20:34:06104 virtual std::string GetLocale() OVERRIDE;
[email protected]07bb6332012-01-21 01:07:57105 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE;
[email protected]96191d52012-05-17 01:37:11106 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy()
107 OVERRIDE;
[email protected]c47317e2012-06-20 22:35:31108 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
[email protected]526476902011-10-06 20:34:06109 virtual void RemoveRoute(int32 routing_id) OVERRIDE;
[email protected]77fc9b92011-10-15 16:20:37110 virtual int GenerateRoutingID() OVERRIDE;
[email protected]526476902011-10-06 20:34:06111 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
112 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
113 virtual void SetOutgoingMessageFilter(
114 IPC::ChannelProxy::OutgoingMessageFilter* filter) OVERRIDE;
115 virtual void AddObserver(content::RenderProcessObserver* observer) OVERRIDE;
116 virtual void RemoveObserver(
117 content::RenderProcessObserver* observer) OVERRIDE;
[email protected]359dfa32011-10-12 01:10:15118 virtual void SetResourceDispatcherDelegate(
119 content::ResourceDispatcherDelegate* delegate) OVERRIDE;
[email protected]526476902011-10-06 20:34:06120 virtual void WidgetHidden() OVERRIDE;
121 virtual void WidgetRestored() OVERRIDE;
122 virtual void EnsureWebKitInitialized() OVERRIDE;
123 virtual void RecordUserMetrics(const std::string& action) OVERRIDE;
[email protected]00614a82011-10-07 22:39:31124 virtual base::SharedMemoryHandle HostAllocateSharedMemoryBuffer(
125 uint32 buffer_size) OVERRIDE;
[email protected]526476902011-10-06 20:34:06126 virtual void RegisterExtension(v8::Extension* extension) OVERRIDE;
[email protected]6593ae12011-11-14 12:09:44127 virtual void ScheduleIdleHandler(int64 initial_delay_ms) OVERRIDE;
[email protected]526476902011-10-06 20:34:06128 virtual void IdleHandler() OVERRIDE;
[email protected]6593ae12011-11-14 12:09:44129 virtual int64 GetIdleNotificationDelayInMs() const OVERRIDE;
130 virtual void SetIdleNotificationDelayInMs(
131 int64 idle_notification_delay_in_ms) OVERRIDE;
[email protected]a1a7ff32012-07-19 14:03:51132 virtual void ToggleWebKitSharedTimer(bool suspend) OVERRIDE;
133 virtual void UpdateHistograms(int sequence_number) OVERRIDE;
[email protected]526476902011-10-06 20:34:06134#if defined(OS_WIN)
135 virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE;
136 virtual void ReleaseCachedFonts() OVERRIDE;
137#endif
[email protected]1223d6ef2011-03-28 16:47:50138
[email protected]988aacf2012-02-12 18:10:03139 // content::ChildThread:
140 virtual bool IsWebFrameValid(WebKit::WebFrame* frame) OVERRIDE;
141
[email protected]b3e83de2012-02-07 03:33:28142 // GpuChannelHostFactory implementation:
143 virtual bool IsMainThread() OVERRIDE;
144 virtual bool IsIOThread() OVERRIDE;
145 virtual MessageLoop* GetMainLoop() OVERRIDE;
[email protected]5b040e592012-02-10 02:56:10146 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE;
[email protected]b3e83de2012-02-07 03:33:28147 virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE;
148 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(
149 uint32 size) OVERRIDE;
150 virtual int32 CreateViewCommandBuffer(
151 int32 surface_id,
152 const GPUCreateCommandBufferConfig& init_params) OVERRIDE;
153
154 // Synchronously establish a channel to the GPU plugin if not previously
155 // established or if it has been lost (for example if the GPU plugin crashed).
156 // If there is a pending asynchronous request, it will be completed by the
157 // time this routine returns.
158 virtual GpuChannelHost* EstablishGpuChannelSync(
159 content::CauseForGpuLaunch) OVERRIDE;
160
161
[email protected]c1f50aa2010-02-18 03:46:57162 // These methods modify how the next message is sent. Normally, when sending
163 // a synchronous message that runs a nested message loop, we need to suspend
164 // callbacks into WebKit. This involves disabling timers and deferring
165 // resource loads. However, there are exceptions when we need to customize
166 // the behavior.
167 void DoNotSuspendWebKitSharedTimer();
168 void DoNotNotifyWebKitOfModalLoop();
169
[email protected]1842fe22012-08-13 23:24:35170 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const {
171 return compositor_output_surface_filter_.get();
172 }
173
[email protected]f3150172011-10-22 02:28:45174 // Will be NULL if threaded compositing has not been enabled.
[email protected]a9fb30aa2011-10-06 06:58:46175 CompositorThread* compositor_thread() const {
176 return compositor_thread_.get();
177 }
178
[email protected]cb25aa12012-08-07 19:13:43179 content::old::BrowserPluginRegistry* browser_plugin_registry() const {
[email protected]468e4902012-05-23 01:49:31180 return browser_plugin_registry_.get();
181 }
182
[email protected]cb25aa12012-08-07 19:13:43183 content::old::BrowserPluginChannelManager*
184 browser_plugin_channel_manager() const {
[email protected]468e4902012-05-23 01:49:31185 return browser_plugin_channel_manager_.get();
186 }
187
[email protected]f430b5712009-08-21 21:46:31188 AppCacheDispatcher* appcache_dispatcher() const {
189 return appcache_dispatcher_.get();
190 }
191
[email protected]19b49512012-05-30 19:22:09192 DomStorageDispatcher* dom_storage_dispatcher() const {
193 return dom_storage_dispatcher_.get();
194 }
195
[email protected]f7eb0a392011-07-12 10:19:51196 AudioInputMessageFilter* audio_input_message_filter() {
197 return audio_input_message_filter_.get();
198 }
199
200 AudioMessageFilter* audio_message_filter() {
201 return audio_message_filter_.get();
202 }
203
[email protected]d8cd8372012-03-09 10:49:51204 // Creates the embedder implementation of WebMediaStreamCenter.
205 // The resulting object is owned by WebKit and deleted by WebKit at tear-down.
206 WebKit::WebMediaStreamCenter* CreateMediaStreamCenter(
207 WebKit::WebMediaStreamCenterClient* client);
208
[email protected]4761cf12012-09-12 10:37:55209 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled.
210 content::P2PSocketDispatcher* p2p_socket_dispatcher() {
211 return p2p_socket_dispatcher_.get();
212 }
213
[email protected]80b161a2011-06-27 17:42:11214 VideoCaptureImplManager* video_capture_impl_manager() const {
215 return vc_manager_.get();
216 }
217
[email protected]6217d392010-03-25 22:08:35218 // Get the GPU channel. Returns NULL if the channel is not established or
219 // has been lost.
220 GpuChannelHost* GetGpuChannel();
221
[email protected]c6a7b862010-08-20 22:19:38222 // Returns a MessageLoopProxy instance corresponding to the message loop
223 // of the thread on which file operations should be run. Must be called
224 // on the renderer's main thread.
225 scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy();
226
[email protected]1784b2f2011-11-24 10:53:48227 // Causes the idle handler to skip sending idle notifications
228 // on the two next scheduled calls, so idle notifications are
229 // not sent for at least one notification delay.
230 void PostponeIdleNotification();
231
[email protected]3b2afc32012-06-18 21:31:16232 // Returns a graphics context shared among all
233 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned
234 // by this class and must be null-tested before each use to detect context
[email protected]fe476b02012-08-13 21:21:38235 // loss. The returned context is only valid on the compositor thread when
[email protected]3b2afc32012-06-18 21:31:16236 // threaded compositing is enabled.
[email protected]fe476b02012-08-13 21:21:38237 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D();
238
239 // Handle loss of the shared GpuVDAContext3D context above.
240 static void OnGpuVDAContextLoss();
[email protected]3b2afc32012-06-18 21:31:16241
[email protected]3958e972012-07-17 00:25:41242 // AudioRendererMixerManager instance which manages renderer side mixer
243 // instances shared based on configured audio parameters. Lazily created on
244 // first call.
245 content::AudioRendererMixerManager* GetAudioRendererMixerManager();
246
[email protected]b2d98762012-09-03 17:04:06247 // For producing custom V8 histograms. Custom histograms are produced if all
248 // RenderViews share the same host, and the host is in the pre-specified set
249 // of hosts we want to produce custom diagrams for. The name for a custom
250 // diagram is the name of the corresponding generic diagram plus a
251 // host-specific suffix.
252 class CONTENT_EXPORT HistogramCustomizer {
253 public:
254 HistogramCustomizer();
255 ~HistogramCustomizer();
256
257 // Called when a top frame of a RenderView navigates. This function updates
258 // RenderThreadImpl's information about whether all RenderViews are
259 // displaying a page from the same host. |host| is the host where a
260 // RenderView navigated, and |view_count| is the number of RenderViews in
261 // this process.
262 void RenderViewNavigatedToHost(const std::string& host, size_t view_count);
263
264 // Used for customizing some histograms if all RenderViews share the same
265 // host. Returns the current custom histogram name to use for
266 // |histogram_name|, or |histogram_name| if it shouldn't be customized.
267 std::string ConvertToCustomHistogramName(const char* histogram_name) const;
268
269 private:
270 friend class RenderThreadImplUnittest;
271
272 // Used for updating the information on which is the common host which all
273 // RenderView's share (if any). If there is no common host, this function is
274 // called with an empty string.
275 void SetCommonHost(const std::string& host);
276
277 // The current common host of the RenderViews; empty string if there is no
278 // common host.
279 std::string common_host_;
280 // The corresponding suffix.
281 std::string common_host_histogram_suffix_;
282 // Set of histograms for which we want to produce a custom histogram if
283 // possible.
284 std::set<std::string> custom_histograms_;
285
286 DISALLOW_COPY_AND_ASSIGN(HistogramCustomizer);
287 };
288
289 HistogramCustomizer* histogram_customizer() {
290 return &histogram_customizer_;
291 }
292
[email protected]8930d472009-02-21 08:05:28293 private:
[email protected]edc64de2011-11-17 20:07:38294 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE;
initial.commit09911bf2008-07-26 23:55:29295
[email protected]42f1d7822009-07-23 18:17:55296 void Init();
initial.commit09911bf2008-07-26 23:55:29297
[email protected]4e2a25a2012-01-27 00:42:08298 void OnSetZoomLevelForCurrentURL(const std::string& host, double zoom_level);
[email protected]b9ab10c2009-08-07 18:09:55299 void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors);
[email protected]4e6419c2010-01-15 04:50:34300 void OnCreateNewView(const ViewMsg_New_Params& params);
initial.commit09911bf2008-07-26 23:55:29301 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id);
[email protected]b78e168b2009-09-21 22:05:45302 void OnPurgePluginListCache(bool reload_pages);
[email protected]6eac57a2011-07-12 21:15:09303 void OnNetworkStateChanged(bool online);
[email protected]b3df5a42010-05-11 14:31:09304 void OnGetAccessibilityTree();
[email protected]b69934e2011-10-29 02:51:52305 void OnTempCrashWithData(const GURL& data);
[email protected]b3df5a42010-05-11 14:31:09306
[email protected]1784b2f2011-11-24 10:53:48307 void IdleHandlerInForegroundTab();
308
initial.commit09911bf2008-07-26 23:55:29309 // These objects live solely on the render thread.
[email protected]f430b5712009-08-21 21:46:31310 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_;
[email protected]1910fe82012-05-10 00:04:10311 scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_;
[email protected]31bfae72011-12-16 02:04:38312 scoped_ptr<IndexedDBDispatcher> main_thread_indexed_db_dispatcher_;
[email protected]8d6cba42011-09-02 10:05:19313 scoped_ptr<RendererWebKitPlatformSupportImpl> webkit_platform_support_;
[email protected]cb25aa12012-08-07 19:13:43314 scoped_ptr<content::old::BrowserPluginChannelManager>
[email protected]468e4902012-05-23 01:49:31315 browser_plugin_channel_manager_;
[email protected]9291ed12009-07-23 17:33:22316
[email protected]d8cd8372012-03-09 10:49:51317 // Used on the render thread and deleted by WebKit at shutdown.
318 content::MediaStreamCenter* media_stream_center_;
319
[email protected]e2b2d4a2009-10-24 03:32:59320 // Used on the renderer and IPC threads.
[email protected]017022b2009-07-27 23:06:34321 scoped_refptr<DBMessageFilter> db_message_filter_;
[email protected]f7eb0a392011-07-12 10:19:51322 scoped_refptr<AudioInputMessageFilter> audio_input_message_filter_;
323 scoped_refptr<AudioMessageFilter> audio_message_filter_;
[email protected]82622452011-07-22 09:57:20324 scoped_refptr<DevToolsAgentFilter> devtools_agent_message_filter_;
[email protected]017022b2009-07-27 23:06:34325
[email protected]4761cf12012-09-12 10:37:55326 // Dispatches all P2P sockets.
327 scoped_refptr<content::P2PSocketDispatcher> p2p_socket_dispatcher_;
328
[email protected]80b161a2011-06-27 17:42:11329 // Used on multiple threads.
330 scoped_refptr<VideoCaptureImplManager> vc_manager_;
331
[email protected]1d4dbde2011-04-01 20:40:35332 // Used on multiple script execution context threads.
333 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
334
[email protected]1a771262011-10-31 09:11:12335 // Initialize COM when using plugins outside the sandbox (Windows only).
336 scoped_ptr<base::win::ScopedCOMInitializer> initialize_com_;
337
[email protected]bee16aab2009-08-26 15:55:03338 // The count of RenderWidgets running through this thread.
339 int widget_count_;
340
341 // The count of hidden RenderWidgets running through this thread.
342 int hidden_widget_count_;
343
344 // The current value of the idle notification timer delay.
[email protected]6593ae12011-11-14 12:09:44345 int64 idle_notification_delay_in_ms_;
[email protected]bee16aab2009-08-26 15:55:03346
[email protected]1784b2f2011-11-24 10:53:48347 // The number of idle handler calls that skip sending idle notifications.
348 int idle_notifications_to_skip_;
349
[email protected]80fc08c52010-03-09 07:43:50350 bool suspend_webkit_shared_timer_;
351 bool notify_webkit_of_modal_loop_;
[email protected]c1f50aa2010-02-18 03:46:57352
[email protected]71d6d852009-12-07 22:12:36353 // Timer that periodically calls IdleHandler.
[email protected]f1a29a02011-10-06 23:08:44354 base::RepeatingTimer<RenderThreadImpl> idle_timer_;
[email protected]71d6d852009-12-07 22:12:36355
[email protected]6217d392010-03-25 22:08:35356 // The channel from the renderer process to the GPU process.
357 scoped_refptr<GpuChannelHost> gpu_channel_;
358
[email protected]c6a7b862010-08-20 22:19:38359 // A lazily initiated thread on which file operations are run.
360 scoped_ptr<base::Thread> file_thread_;
361
[email protected]2db58cf92011-12-01 21:39:01362 bool compositor_initialized_;
[email protected]a9fb30aa2011-10-06 06:58:46363 scoped_ptr<CompositorThread> compositor_thread_;
[email protected]1842fe22012-08-13 23:24:35364 scoped_refptr<IPC::ForwardingMessageFilter> compositor_output_surface_filter_;
365
[email protected]cb25aa12012-08-07 19:13:43366 scoped_ptr<content::old::BrowserPluginRegistry> browser_plugin_registry_;
[email protected]a9fb30aa2011-10-06 06:58:46367
[email protected]64ffa0442011-10-03 22:08:36368 ObserverList<content::RenderProcessObserver> observers_;
[email protected]1223d6ef2011-03-28 16:47:50369
[email protected]fe476b02012-08-13 21:21:38370 class GpuVDAContextLostCallback;
371 scoped_ptr<GpuVDAContextLostCallback> context_lost_cb_;
[email protected]3b2afc32012-06-18 21:31:16372 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_;
373
[email protected]3958e972012-07-17 00:25:41374 scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_;
375
[email protected]b2d98762012-09-03 17:04:06376 HistogramCustomizer histogram_customizer_;
377
[email protected]f1a29a02011-10-06 23:08:44378 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
initial.commit09911bf2008-07-26 23:55:29379};
380
[email protected]f1a29a02011-10-06 23:08:44381#endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_