1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
12 #include "base/cancelable_callback.h"
13 #include "base/memory/memory_pressure_listener.h"
14 #include "base/memory/ref_counted.h"
15 #include "base/metrics/user_metrics_action.h"
16 #include "base/observer_list.h"
17 #include "base/strings/string16.h"
18 #include "base/threading/thread_checker.h"
19 #include "base/timer/timer.h"
20 #include "build/build_config.h"
21 #include "content/child/child_thread_impl.h"
22 #include "content/common/content_export.h"
23 #include "content/common/frame_replication_state.h"
24 #include "content/common/gpu/client/gpu_channel_host.h"
25 #include "content/common/gpu/gpu_result_codes.h"
26 #include "content/public/renderer/render_thread.h"
27 #include "content/renderer/gpu/compositor_dependencies.h"
28 #include "net/base/network_change_notifier.h"
29 #include "third_party/WebKit/public/platform/WebConnectionType.h"
30 #include "ui/gfx/native_widget_types.h"
32 #if defined(OS_MACOSX)
33 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
38 struct FrameMsg_NewFrame_Params
;
39 struct ViewMsg_New_Params
;
40 struct ViewMsg_UpdateScrollbarTheme_Params
;
41 struct WorkerProcessMsg_CreateWorker_Params
;
45 class WebGraphicsContext3D
;
46 class WebMediaStreamCenter
;
47 class WebMediaStreamCenterClient
;
51 class SingleThreadTaskRunner
;
56 class ContextProvider
;
57 class TaskGraphRunner
;
61 class ContextProviderWebContext
;
69 class AudioHardwareConfig
;
70 class GpuVideoAcceleratorFactories
;
74 class RendererScheduler
;
83 class AppCacheDispatcher
;
84 class AecDumpMessageFilter
;
85 class AudioInputMessageFilter
;
86 class AudioMessageFilter
;
87 class AudioRendererMixerManager
;
88 class BluetoothMessageFilter
;
89 class BrowserPluginManager
;
90 class CacheStorageDispatcher
;
91 class CompositorForwardingMessageFilter
;
92 class ContextProviderCommandBuffer
;
93 class DBMessageFilter
;
94 class DevToolsAgentFilter
;
95 class DomStorageDispatcher
;
96 class EmbeddedWorkerDispatcher
;
98 class IndexedDBDispatcher
;
99 class InputHandlerManager
;
100 class MediaStreamCenter
;
101 class MemoryObserver
;
102 class MidiMessageFilter
;
103 class NetInfoDispatcher
;
104 class P2PSocketDispatcher
;
105 class PeerConnectionDependencyFactory
;
106 class PeerConnectionTracker
;
107 class RasterWorkerPool
;
108 class RenderProcessObserver
;
109 class RendererBlinkPlatformImpl
;
110 class RendererDemuxerAndroid
;
111 class ResourceDispatchThrottler
;
112 class ResourceSchedulingFilter
;
113 class V8SamplingProfiler
;
114 class VideoCaptureImplManager
;
115 class WebGraphicsContext3DCommandBufferImpl
;
116 class WebRTCIdentityService
;
118 #if defined(COMPILER_MSVC)
119 // See explanation for other RenderViewHostImpl which is the same issue.
120 #pragma warning(push)
121 #pragma warning(disable: 4250)
124 // The RenderThreadImpl class represents a background thread where RenderView
125 // instances live. The RenderThread supports an API that is used by its
126 // consumer to talk indirectly to the RenderViews and supporting objects.
127 // Likewise, it provides an API for the RenderViews to talk back to the main
128 // process (i.e., their corresponding WebContentsImpl).
130 // Most of the communication occurs in the form of IPC messages. They are
131 // routed to the RenderThread according to the routing IDs of the messages.
132 // The routing IDs correspond to RenderView instances.
133 class CONTENT_EXPORT RenderThreadImpl
134 : public RenderThread
,
135 public ChildThreadImpl
,
136 public GpuChannelHostFactory
,
137 NON_EXPORTED_BASE(public CompositorDependencies
) {
139 static RenderThreadImpl
* Create(const InProcessChildThreadParams
& params
);
140 static RenderThreadImpl
* Create(
141 scoped_ptr
<base::MessageLoop
> main_message_loop
,
142 scoped_ptr
<scheduler::RendererScheduler
> renderer_scheduler
);
143 static RenderThreadImpl
* current();
145 ~RenderThreadImpl() override
;
146 void Shutdown() override
;
148 // When initializing WebKit, ensure that any schemes needed for the content
149 // module are registered properly. Static to allow sharing with tests.
150 static void RegisterSchemes();
152 // Notify V8 that the date/time configuration of the system might have
154 static void NotifyTimezoneChange();
156 // RenderThread implementation:
157 bool Send(IPC::Message
* msg
) override
;
158 IPC::SyncChannel
* GetChannel() override
;
159 std::string
GetLocale() override
;
160 IPC::SyncMessageFilter
* GetSyncMessageFilter() override
;
161 scoped_refptr
<base::SingleThreadTaskRunner
> GetIOMessageLoopProxy() override
;
162 void AddRoute(int32 routing_id
, IPC::Listener
* listener
) override
;
163 void RemoveRoute(int32 routing_id
) override
;
164 int GenerateRoutingID() override
;
165 void AddFilter(IPC::MessageFilter
* filter
) override
;
166 void RemoveFilter(IPC::MessageFilter
* filter
) override
;
167 void AddObserver(RenderProcessObserver
* observer
) override
;
168 void RemoveObserver(RenderProcessObserver
* observer
) override
;
169 void SetResourceDispatcherDelegate(
170 ResourceDispatcherDelegate
* delegate
) override
;
171 void EnsureWebKitInitialized() override
;
172 void RecordAction(const base::UserMetricsAction
& action
) override
;
173 void RecordComputedAction(const std::string
& action
) override
;
174 scoped_ptr
<base::SharedMemory
> HostAllocateSharedMemoryBuffer(
175 size_t buffer_size
) override
;
176 cc::SharedBitmapManager
* GetSharedBitmapManager() override
;
177 void RegisterExtension(v8::Extension
* extension
) override
;
178 void ScheduleIdleHandler(int64 initial_delay_ms
) override
;
179 void IdleHandler() override
;
180 int64
GetIdleNotificationDelayInMs() const override
;
181 void SetIdleNotificationDelayInMs(
182 int64 idle_notification_delay_in_ms
) override
;
183 void UpdateHistograms(int sequence_number
) override
;
184 int PostTaskToAllWebWorkers(const base::Closure
& closure
) override
;
185 bool ResolveProxy(const GURL
& url
, std::string
* proxy_list
) override
;
186 base::WaitableEvent
* GetShutdownEvent() override
;
187 ServiceRegistry
* GetServiceRegistry() override
;
189 // CompositorDependencies implementation.
190 bool IsGpuRasterizationForced() override
;
191 bool IsGpuRasterizationEnabled() override
;
192 int GetGpuRasterizationMSAASampleCount() override
;
193 bool IsLcdTextEnabled() override
;
194 bool IsDistanceFieldTextEnabled() override
;
195 bool IsZeroCopyEnabled() override
;
196 bool IsOneCopyEnabled() override
;
197 bool IsPersistentGpuMemoryBufferEnabled() override
;
198 bool IsElasticOverscrollEnabled() override
;
199 std::vector
<unsigned> GetImageTextureTargets() override
;
200 scoped_refptr
<base::SingleThreadTaskRunner
>
201 GetCompositorMainThreadTaskRunner() override
;
202 scoped_refptr
<base::SingleThreadTaskRunner
>
203 GetCompositorImplThreadTaskRunner() override
;
204 gpu::GpuMemoryBufferManager
* GetGpuMemoryBufferManager() override
;
205 scheduler::RendererScheduler
* GetRendererScheduler() override
;
206 cc::ContextProvider
* GetSharedMainThreadContextProvider() override
;
207 scoped_ptr
<cc::BeginFrameSource
> CreateExternalBeginFrameSource(
208 int routing_id
) override
;
209 cc::TaskGraphRunner
* GetTaskGraphRunner() override
;
210 bool IsGatherPixelRefsEnabled() override
;
211 bool IsThreadedAnimationEnabled() override
;
213 // Synchronously establish a channel to the GPU plugin if not previously
214 // established or if it has been lost (for example if the GPU plugin crashed).
215 // If there is a pending asynchronous request, it will be completed by the
216 // time this routine returns.
217 GpuChannelHost
* EstablishGpuChannelSync(CauseForGpuLaunch
);
220 // This method modifies how the next message is sent. Normally, when sending
221 // a synchronous message that runs a nested message loop, we need to suspend
222 // callbacks into WebKit. This involves disabling timers and deferring
223 // resource loads. However, there are exceptions when we need to customize
225 void DoNotNotifyWebKitOfModalLoop();
227 // True if we are running layout tests. This currently disables forwarding
228 // various status messages to the console, skips network error pages, and
229 // short circuits size update and focus events.
230 bool layout_test_mode() const {
231 return layout_test_mode_
;
233 void set_layout_test_mode(bool layout_test_mode
) {
234 layout_test_mode_
= layout_test_mode
;
237 RendererBlinkPlatformImpl
* blink_platform_impl() const {
238 DCHECK(blink_platform_impl_
);
239 return blink_platform_impl_
.get();
242 CompositorForwardingMessageFilter
* compositor_message_filter() const {
243 return compositor_message_filter_
.get();
246 InputHandlerManager
* input_handler_manager() const {
247 return input_handler_manager_
.get();
250 // Will be null if threaded compositing has not been enabled.
251 scoped_refptr
<base::SingleThreadTaskRunner
> compositor_task_runner() const {
252 return compositor_task_runner_
;
255 AppCacheDispatcher
* appcache_dispatcher() const {
256 return appcache_dispatcher_
.get();
259 DomStorageDispatcher
* dom_storage_dispatcher() const {
260 return dom_storage_dispatcher_
.get();
263 EmbeddedWorkerDispatcher
* embedded_worker_dispatcher() const {
264 return embedded_worker_dispatcher_
.get();
267 AudioInputMessageFilter
* audio_input_message_filter() {
268 return audio_input_message_filter_
.get();
271 AudioMessageFilter
* audio_message_filter() {
272 return audio_message_filter_
.get();
275 MidiMessageFilter
* midi_message_filter() {
276 return midi_message_filter_
.get();
279 #if defined(OS_ANDROID)
280 RendererDemuxerAndroid
* renderer_demuxer() {
281 return renderer_demuxer_
.get();
285 // Creates the embedder implementation of WebMediaStreamCenter.
286 // The resulting object is owned by WebKit and deleted by WebKit at tear-down.
287 blink::WebMediaStreamCenter
* CreateMediaStreamCenter(
288 blink::WebMediaStreamCenterClient
* client
);
290 BrowserPluginManager
* browser_plugin_manager() const {
291 return browser_plugin_manager_
.get();
294 #if defined(ENABLE_WEBRTC)
295 // Returns a factory used for creating RTC PeerConnection objects.
296 PeerConnectionDependencyFactory
* GetPeerConnectionDependencyFactory();
298 PeerConnectionTracker
* peer_connection_tracker() {
299 return peer_connection_tracker_
.get();
302 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled.
303 P2PSocketDispatcher
* p2p_socket_dispatcher() {
304 return p2p_socket_dispatcher_
.get();
308 VideoCaptureImplManager
* video_capture_impl_manager() const {
309 return vc_manager_
.get();
312 // Get the GPU channel. Returns NULL if the channel is not established or
314 GpuChannelHost
* GetGpuChannel();
316 // Returns a SingleThreadTaskRunner instance corresponding to the message loop
317 // of the thread on which file operations should be run. Must be called
318 // on the renderer's main thread.
319 scoped_refptr
<base::SingleThreadTaskRunner
> GetFileThreadMessageLoopProxy();
321 // Returns a SingleThreadTaskRunner instance corresponding to the message loop
322 // of the thread on which media operations should be run. Must be called
323 // on the renderer's main thread.
324 scoped_refptr
<base::SingleThreadTaskRunner
> GetMediaThreadTaskRunner();
326 // A TaskRunner instance that runs tasks on the raster worker pool.
327 base::TaskRunner
* GetWorkerTaskRunner();
329 // Causes the idle handler to skip sending idle notifications
330 // on the two next scheduled calls, so idle notifications are
331 // not sent for at least one notification delay.
332 void PostponeIdleNotification();
334 scoped_refptr
<media::GpuVideoAcceleratorFactories
> GetGpuFactories();
336 scoped_refptr
<cc_blink::ContextProviderWebContext
>
337 SharedMainThreadContextProvider();
339 // AudioRendererMixerManager instance which manages renderer side mixer
340 // instances shared based on configured audio parameters. Lazily created on
342 AudioRendererMixerManager
* GetAudioRendererMixerManager();
344 // AudioHardwareConfig contains audio hardware configuration for
345 // renderer side clients. Creation requires a synchronous IPC call so it is
346 // lazily created on the first call.
347 media::AudioHardwareConfig
* GetAudioHardwareConfig();
350 void PreCacheFontCharacters(const LOGFONT
& log_font
,
351 const base::string16
& str
);
354 #if defined(ENABLE_WEBRTC)
355 WebRTCIdentityService
* get_webrtc_identity_service() {
356 return webrtc_identity_service_
.get();
360 // For producing custom V8 histograms. Custom histograms are produced if all
361 // RenderViews share the same host, and the host is in the pre-specified set
362 // of hosts we want to produce custom diagrams for. The name for a custom
363 // diagram is the name of the corresponding generic diagram plus a
364 // host-specific suffix.
365 class CONTENT_EXPORT HistogramCustomizer
{
367 HistogramCustomizer();
368 ~HistogramCustomizer();
370 // Called when a top frame of a RenderView navigates. This function updates
371 // RenderThreadImpl's information about whether all RenderViews are
372 // displaying a page from the same host. |host| is the host where a
373 // RenderView navigated, and |view_count| is the number of RenderViews in
375 void RenderViewNavigatedToHost(const std::string
& host
, size_t view_count
);
377 // Used for customizing some histograms if all RenderViews share the same
378 // host. Returns the current custom histogram name to use for
379 // |histogram_name|, or |histogram_name| if it shouldn't be customized.
380 std::string
ConvertToCustomHistogramName(const char* histogram_name
) const;
383 friend class RenderThreadImplUnittest
;
385 // Used for updating the information on which is the common host which all
386 // RenderView's share (if any). If there is no common host, this function is
387 // called with an empty string.
388 void SetCommonHost(const std::string
& host
);
390 // The current common host of the RenderViews; empty string if there is no
392 std::string common_host_
;
393 // The corresponding suffix.
394 std::string common_host_histogram_suffix_
;
395 // Set of histograms for which we want to produce a custom histogram if
397 std::set
<std::string
> custom_histograms_
;
399 DISALLOW_COPY_AND_ASSIGN(HistogramCustomizer
);
402 HistogramCustomizer
* histogram_customizer() {
403 return &histogram_customizer_
;
406 // Retrieve current gamepad data.
407 void SampleGamepads(blink::WebGamepads
* data
);
409 // Called by a RenderWidget when it is created or destroyed. This
410 // allows the process to know when there are no visible widgets.
411 void WidgetCreated();
412 // Note: A widget must not be hidden when it is destroyed - ensure that
413 // WidgetRestored is called before WidgetDestroyed for any hidden widget.
414 void WidgetDestroyed();
416 void WidgetRestored();
418 void AddEmbeddedWorkerRoute(int32 routing_id
, IPC::Listener
* listener
);
419 void RemoveEmbeddedWorkerRoute(int32 routing_id
);
421 void RegisterPendingRenderFrameConnect(
423 mojo::InterfaceRequest
<mojo::ServiceProvider
> services
,
424 mojo::ServiceProviderPtr exposed_services
);
427 RenderThreadImpl(const InProcessChildThreadParams
& params
,
428 scoped_ptr
<scheduler::RendererScheduler
> scheduler
);
429 RenderThreadImpl(scoped_ptr
<base::MessageLoop
> main_message_loop
,
430 scoped_ptr
<scheduler::RendererScheduler
> scheduler
);
431 virtual void SetResourceDispatchTaskQueue(
432 const scoped_refptr
<base::SingleThreadTaskRunner
>& resource_task_queue
);
436 bool OnControlMessageReceived(const IPC::Message
& msg
) override
;
438 // GpuChannelHostFactory implementation:
439 bool IsMainThread() override
;
440 scoped_refptr
<base::SingleThreadTaskRunner
> GetIOThreadTaskRunner() override
;
441 scoped_ptr
<base::SharedMemory
> AllocateSharedMemory(size_t size
) override
;
442 CreateCommandBufferResult
CreateViewCommandBuffer(
444 const GPUCreateCommandBufferConfig
& init_params
,
445 int32 route_id
) override
;
449 void OnCreateNewFrame(FrameMsg_NewFrame_Params params
);
450 void OnCreateNewFrameProxy(int routing_id
,
451 int parent_routing_id
,
452 int render_view_routing_id
,
453 const FrameReplicationState
& replicated_state
);
454 void OnSetZoomLevelForCurrentURL(const std::string
& scheme
,
455 const std::string
& host
,
457 void OnCreateNewView(const ViewMsg_New_Params
& params
);
458 void OnTransferBitmap(const SkBitmap
& bitmap
, int resource_id
);
459 #if defined(ENABLE_PLUGINS)
460 void OnPurgePluginListCache(bool reload_pages
);
462 void OnNetworkTypeChanged(net::NetworkChangeNotifier::ConnectionType type
);
463 void OnGetAccessibilityTree();
464 void OnUpdateTimezone(const std::string
& zoneId
);
465 void OnMemoryPressure(
466 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level
);
467 #if defined(OS_ANDROID)
468 void OnSetWebKitSharedTimersSuspended(bool suspend
);
470 #if defined(OS_MACOSX)
471 void OnUpdateScrollbarTheme(
472 const ViewMsg_UpdateScrollbarTheme_Params
& params
);
474 void OnCreateNewSharedWorker(
475 const WorkerProcessMsg_CreateWorker_Params
& params
);
476 bool RendererIsHidden() const;
477 void OnRendererHidden();
478 void OnRendererVisible();
480 void ReleaseFreeMemory();
482 scoped_ptr
<WebGraphicsContext3DCommandBufferImpl
> CreateOffscreenContext3d();
484 // These objects live solely on the render thread.
485 scoped_ptr
<AppCacheDispatcher
> appcache_dispatcher_
;
486 scoped_ptr
<DomStorageDispatcher
> dom_storage_dispatcher_
;
487 scoped_ptr
<IndexedDBDispatcher
> main_thread_indexed_db_dispatcher_
;
488 scoped_ptr
<scheduler::RendererScheduler
> renderer_scheduler_
;
489 scoped_ptr
<RendererBlinkPlatformImpl
> blink_platform_impl_
;
490 scoped_ptr
<ResourceDispatchThrottler
> resource_dispatch_throttler_
;
491 scoped_ptr
<CacheStorageDispatcher
> main_thread_cache_storage_dispatcher_
;
492 scoped_ptr
<EmbeddedWorkerDispatcher
> embedded_worker_dispatcher_
;
494 // Used on the render thread and deleted by WebKit at shutdown.
495 blink::WebMediaStreamCenter
* media_stream_center_
;
497 // Used on the renderer and IPC threads.
498 scoped_refptr
<DBMessageFilter
> db_message_filter_
;
499 scoped_refptr
<AudioInputMessageFilter
> audio_input_message_filter_
;
500 scoped_refptr
<AudioMessageFilter
> audio_message_filter_
;
501 scoped_refptr
<MidiMessageFilter
> midi_message_filter_
;
502 #if defined(OS_ANDROID)
503 scoped_refptr
<RendererDemuxerAndroid
> renderer_demuxer_
;
505 scoped_refptr
<DevToolsAgentFilter
> devtools_agent_message_filter_
;
506 scoped_ptr
<V8SamplingProfiler
> v8_sampling_profiler_
;
508 scoped_ptr
<BrowserPluginManager
> browser_plugin_manager_
;
510 #if defined(ENABLE_WEBRTC)
511 scoped_ptr
<PeerConnectionDependencyFactory
> peer_connection_factory_
;
513 // This is used to communicate to the browser process the status
514 // of all the peer connections created in the renderer.
515 scoped_ptr
<PeerConnectionTracker
> peer_connection_tracker_
;
517 // Dispatches all P2P sockets.
518 scoped_refptr
<P2PSocketDispatcher
> p2p_socket_dispatcher_
;
521 // Used on the render thread.
522 scoped_ptr
<VideoCaptureImplManager
> vc_manager_
;
524 // Used for communicating registering AEC dump consumers with the browser and
525 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is
526 // diagnostic audio data for WebRTC stored locally when enabled by the user in
527 // chrome://webrtc-internals.
528 scoped_refptr
<AecDumpMessageFilter
> aec_dump_message_filter_
;
530 // The count of RenderWidgets running through this thread.
533 // The count of hidden RenderWidgets running through this thread.
534 int hidden_widget_count_
;
536 // The current value of the idle notification timer delay.
537 int64 idle_notification_delay_in_ms_
;
539 // The number of idle handler calls that skip sending idle notifications.
540 int idle_notifications_to_skip_
;
542 bool notify_webkit_of_modal_loop_
;
543 bool webkit_shared_timer_suspended_
;
545 // The following flag is used to control layout test specific behavior.
546 bool layout_test_mode_
;
548 // Timer that periodically calls IdleHandler.
549 base::RepeatingTimer
<RenderThreadImpl
> idle_timer_
;
551 // The channel from the renderer process to the GPU process.
552 scoped_refptr
<GpuChannelHost
> gpu_channel_
;
554 // Cache of variables that are needed on the compositor thread by
555 // GpuChannelHostFactory methods.
556 scoped_refptr
<base::SingleThreadTaskRunner
> io_thread_task_runner_
;
558 // The message loop of the renderer main thread.
559 // This message loop should be destructed before the RenderThreadImpl
561 scoped_ptr
<base::MessageLoop
> main_message_loop_
;
563 // A lazily initiated thread on which file operations are run.
564 scoped_ptr
<base::Thread
> file_thread_
;
566 // May be null if overridden by ContentRendererClient.
567 scoped_ptr
<base::Thread
> compositor_thread_
;
569 // Thread for running multimedia operations (e.g., video decoding).
570 scoped_ptr
<base::Thread
> media_thread_
;
572 // Will point to appropriate task runner after initialization,
573 // regardless of whether |compositor_thread_| is overriden.
574 scoped_refptr
<base::SingleThreadTaskRunner
> compositor_task_runner_
;
576 // Pool of workers used for raster operations (e.g., tile rasterization).
577 scoped_refptr
<RasterWorkerPool
> raster_worker_pool_
;
579 base::CancelableCallback
<void(const IPC::Message
&)> main_input_callback_
;
580 scoped_refptr
<IPC::MessageFilter
> input_event_filter_
;
581 scoped_ptr
<InputHandlerManager
> input_handler_manager_
;
582 scoped_refptr
<CompositorForwardingMessageFilter
> compositor_message_filter_
;
584 scoped_refptr
<BluetoothMessageFilter
> bluetooth_message_filter_
;
586 scoped_refptr
<cc_blink::ContextProviderWebContext
>
587 shared_main_thread_contexts_
;
589 base::ObserverList
<RenderProcessObserver
> observers_
;
591 scoped_refptr
<ContextProviderCommandBuffer
> gpu_va_context_provider_
;
593 scoped_ptr
<AudioRendererMixerManager
> audio_renderer_mixer_manager_
;
594 scoped_ptr
<media::AudioHardwareConfig
> audio_hardware_config_
;
596 HistogramCustomizer histogram_customizer_
;
598 scoped_ptr
<base::MemoryPressureListener
> memory_pressure_listener_
;
600 #if defined(ENABLE_WEBRTC)
601 scoped_ptr
<WebRTCIdentityService
> webrtc_identity_service_
;
604 scoped_ptr
<MemoryObserver
> memory_observer_
;
606 scoped_refptr
<base::SingleThreadTaskRunner
>
607 main_thread_compositor_task_runner_
;
609 scoped_refptr
<ResourceSchedulingFilter
> resource_scheduling_filter_
;
611 // Compositor settings.
612 bool is_gpu_rasterization_enabled_
;
613 bool is_gpu_rasterization_forced_
;
614 int gpu_rasterization_msaa_sample_count_
;
615 bool is_lcd_text_enabled_
;
616 bool is_distance_field_text_enabled_
;
617 bool is_zero_copy_enabled_
;
618 bool is_one_copy_enabled_
;
619 bool is_persistent_gpu_memory_buffer_enabled_
;
620 bool is_elastic_overscroll_enabled_
;
621 std::vector
<unsigned> use_image_texture_targets_
;
622 bool is_gather_pixel_refs_enabled_
;
623 bool is_threaded_animation_enabled_
;
625 class PendingRenderFrameConnect
626 : public base::RefCounted
<PendingRenderFrameConnect
> {
628 PendingRenderFrameConnect(
630 mojo::InterfaceRequest
<mojo::ServiceProvider
> services
,
631 mojo::ServiceProviderPtr exposed_services
);
633 mojo::InterfaceRequest
<mojo::ServiceProvider
>& services() {
637 mojo::ServiceProviderPtr
& exposed_services() { return exposed_services_
; }
640 friend class base::RefCounted
<PendingRenderFrameConnect
>;
642 ~PendingRenderFrameConnect();
644 // Mojo error handler.
645 void OnConnectionError();
648 mojo::InterfaceRequest
<mojo::ServiceProvider
> services_
;
649 mojo::ServiceProviderPtr exposed_services_
;
652 typedef std::map
<int, scoped_refptr
<PendingRenderFrameConnect
>>
653 PendingRenderFrameConnectMap
;
654 PendingRenderFrameConnectMap pending_render_frame_connects_
;
656 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl
);
659 #if defined(COMPILER_MSVC)
663 } // namespace content
665 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_