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 IsPersistentGpuMemoryBufferEnabled() override
;
197 bool IsElasticOverscrollEnabled() override
;
198 std::vector
<unsigned> GetImageTextureTargets() override
;
199 scoped_refptr
<base::SingleThreadTaskRunner
>
200 GetCompositorMainThreadTaskRunner() override
;
201 scoped_refptr
<base::SingleThreadTaskRunner
>
202 GetCompositorImplThreadTaskRunner() override
;
203 gpu::GpuMemoryBufferManager
* GetGpuMemoryBufferManager() override
;
204 scheduler::RendererScheduler
* GetRendererScheduler() override
;
205 cc::ContextProvider
* GetSharedMainThreadContextProvider() override
;
206 scoped_ptr
<cc::BeginFrameSource
> CreateExternalBeginFrameSource(
207 int routing_id
) override
;
208 cc::TaskGraphRunner
* GetTaskGraphRunner() override
;
209 bool IsGatherPixelRefsEnabled() override
;
210 bool IsThreadedAnimationEnabled() override
;
212 // Synchronously establish a channel to the GPU plugin if not previously
213 // established or if it has been lost (for example if the GPU plugin crashed).
214 // If there is a pending asynchronous request, it will be completed by the
215 // time this routine returns.
216 GpuChannelHost
* EstablishGpuChannelSync(CauseForGpuLaunch
);
219 // This method modifies how the next message is sent. Normally, when sending
220 // a synchronous message that runs a nested message loop, we need to suspend
221 // callbacks into WebKit. This involves disabling timers and deferring
222 // resource loads. However, there are exceptions when we need to customize
224 void DoNotNotifyWebKitOfModalLoop();
226 // True if we are running layout tests. This currently disables forwarding
227 // various status messages to the console, skips network error pages, and
228 // short circuits size update and focus events.
229 bool layout_test_mode() const {
230 return layout_test_mode_
;
232 void set_layout_test_mode(bool layout_test_mode
) {
233 layout_test_mode_
= layout_test_mode
;
236 RendererBlinkPlatformImpl
* blink_platform_impl() const {
237 DCHECK(blink_platform_impl_
);
238 return blink_platform_impl_
.get();
241 CompositorForwardingMessageFilter
* compositor_message_filter() const {
242 return compositor_message_filter_
.get();
245 InputHandlerManager
* input_handler_manager() const {
246 return input_handler_manager_
.get();
249 // Will be null if threaded compositing has not been enabled.
250 scoped_refptr
<base::SingleThreadTaskRunner
> compositor_task_runner() const {
251 return compositor_task_runner_
;
254 AppCacheDispatcher
* appcache_dispatcher() const {
255 return appcache_dispatcher_
.get();
258 DomStorageDispatcher
* dom_storage_dispatcher() const {
259 return dom_storage_dispatcher_
.get();
262 EmbeddedWorkerDispatcher
* embedded_worker_dispatcher() const {
263 return embedded_worker_dispatcher_
.get();
266 AudioInputMessageFilter
* audio_input_message_filter() {
267 return audio_input_message_filter_
.get();
270 AudioMessageFilter
* audio_message_filter() {
271 return audio_message_filter_
.get();
274 MidiMessageFilter
* midi_message_filter() {
275 return midi_message_filter_
.get();
278 #if defined(OS_ANDROID)
279 RendererDemuxerAndroid
* renderer_demuxer() {
280 return renderer_demuxer_
.get();
284 // Creates the embedder implementation of WebMediaStreamCenter.
285 // The resulting object is owned by WebKit and deleted by WebKit at tear-down.
286 blink::WebMediaStreamCenter
* CreateMediaStreamCenter(
287 blink::WebMediaStreamCenterClient
* client
);
289 BrowserPluginManager
* browser_plugin_manager() const {
290 return browser_plugin_manager_
.get();
293 #if defined(ENABLE_WEBRTC)
294 // Returns a factory used for creating RTC PeerConnection objects.
295 PeerConnectionDependencyFactory
* GetPeerConnectionDependencyFactory();
297 PeerConnectionTracker
* peer_connection_tracker() {
298 return peer_connection_tracker_
.get();
301 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled.
302 P2PSocketDispatcher
* p2p_socket_dispatcher() {
303 return p2p_socket_dispatcher_
.get();
307 VideoCaptureImplManager
* video_capture_impl_manager() const {
308 return vc_manager_
.get();
311 // Get the GPU channel. Returns NULL if the channel is not established or
313 GpuChannelHost
* GetGpuChannel();
315 // Returns a SingleThreadTaskRunner instance corresponding to the message loop
316 // of the thread on which file operations should be run. Must be called
317 // on the renderer's main thread.
318 scoped_refptr
<base::SingleThreadTaskRunner
> GetFileThreadMessageLoopProxy();
320 // Returns a SingleThreadTaskRunner instance corresponding to the message loop
321 // of the thread on which media operations should be run. Must be called
322 // on the renderer's main thread.
323 scoped_refptr
<base::SingleThreadTaskRunner
> GetMediaThreadTaskRunner();
325 // A TaskRunner instance that runs tasks on the raster worker pool.
326 base::TaskRunner
* GetWorkerTaskRunner();
328 // Causes the idle handler to skip sending idle notifications
329 // on the two next scheduled calls, so idle notifications are
330 // not sent for at least one notification delay.
331 void PostponeIdleNotification();
333 scoped_refptr
<media::GpuVideoAcceleratorFactories
> GetGpuFactories();
335 scoped_refptr
<cc_blink::ContextProviderWebContext
>
336 SharedMainThreadContextProvider();
338 // AudioRendererMixerManager instance which manages renderer side mixer
339 // instances shared based on configured audio parameters. Lazily created on
341 AudioRendererMixerManager
* GetAudioRendererMixerManager();
343 // AudioHardwareConfig contains audio hardware configuration for
344 // renderer side clients. Creation requires a synchronous IPC call so it is
345 // lazily created on the first call.
346 media::AudioHardwareConfig
* GetAudioHardwareConfig();
349 void PreCacheFontCharacters(const LOGFONT
& log_font
,
350 const base::string16
& str
);
353 #if defined(ENABLE_WEBRTC)
354 WebRTCIdentityService
* get_webrtc_identity_service() {
355 return webrtc_identity_service_
.get();
359 // For producing custom V8 histograms. Custom histograms are produced if all
360 // RenderViews share the same host, and the host is in the pre-specified set
361 // of hosts we want to produce custom diagrams for. The name for a custom
362 // diagram is the name of the corresponding generic diagram plus a
363 // host-specific suffix.
364 class CONTENT_EXPORT HistogramCustomizer
{
366 HistogramCustomizer();
367 ~HistogramCustomizer();
369 // Called when a top frame of a RenderView navigates. This function updates
370 // RenderThreadImpl's information about whether all RenderViews are
371 // displaying a page from the same host. |host| is the host where a
372 // RenderView navigated, and |view_count| is the number of RenderViews in
374 void RenderViewNavigatedToHost(const std::string
& host
, size_t view_count
);
376 // Used for customizing some histograms if all RenderViews share the same
377 // host. Returns the current custom histogram name to use for
378 // |histogram_name|, or |histogram_name| if it shouldn't be customized.
379 std::string
ConvertToCustomHistogramName(const char* histogram_name
) const;
382 friend class RenderThreadImplUnittest
;
384 // Used for updating the information on which is the common host which all
385 // RenderView's share (if any). If there is no common host, this function is
386 // called with an empty string.
387 void SetCommonHost(const std::string
& host
);
389 // The current common host of the RenderViews; empty string if there is no
391 std::string common_host_
;
392 // The corresponding suffix.
393 std::string common_host_histogram_suffix_
;
394 // Set of histograms for which we want to produce a custom histogram if
396 std::set
<std::string
> custom_histograms_
;
398 DISALLOW_COPY_AND_ASSIGN(HistogramCustomizer
);
401 HistogramCustomizer
* histogram_customizer() {
402 return &histogram_customizer_
;
405 // Retrieve current gamepad data.
406 void SampleGamepads(blink::WebGamepads
* data
);
408 // Called by a RenderWidget when it is created or destroyed. This
409 // allows the process to know when there are no visible widgets.
410 void WidgetCreated();
411 // Note: A widget must not be hidden when it is destroyed - ensure that
412 // WidgetRestored is called before WidgetDestroyed for any hidden widget.
413 void WidgetDestroyed();
415 void WidgetRestored();
417 void AddEmbeddedWorkerRoute(int32 routing_id
, IPC::Listener
* listener
);
418 void RemoveEmbeddedWorkerRoute(int32 routing_id
);
420 void RegisterPendingRenderFrameConnect(
422 mojo::InterfaceRequest
<mojo::ServiceProvider
> services
,
423 mojo::ServiceProviderPtr exposed_services
);
426 RenderThreadImpl(const InProcessChildThreadParams
& params
,
427 scoped_ptr
<scheduler::RendererScheduler
> scheduler
);
428 RenderThreadImpl(scoped_ptr
<base::MessageLoop
> main_message_loop
,
429 scoped_ptr
<scheduler::RendererScheduler
> scheduler
);
430 virtual void SetResourceDispatchTaskQueue(
431 const scoped_refptr
<base::SingleThreadTaskRunner
>& resource_task_queue
);
435 bool OnControlMessageReceived(const IPC::Message
& msg
) override
;
436 void OnProcessBackgrounded(bool backgrounded
) 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 render_view_routing_id
,
452 int opener_routing_id
,
453 int parent_routing_id
,
454 const FrameReplicationState
& replicated_state
);
455 void OnSetZoomLevelForCurrentURL(const std::string
& scheme
,
456 const std::string
& host
,
458 void OnCreateNewView(const ViewMsg_New_Params
& params
);
459 void OnTransferBitmap(const SkBitmap
& bitmap
, int resource_id
);
460 #if defined(ENABLE_PLUGINS)
461 void OnPurgePluginListCache(bool reload_pages
);
463 void OnNetworkConnectionChanged(
464 net::NetworkChangeNotifier::ConnectionType type
,
465 double max_bandwidth_mbps
);
466 void OnGetAccessibilityTree();
467 void OnUpdateTimezone(const std::string
& zoneId
);
468 void OnMemoryPressure(
469 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level
);
470 #if defined(OS_ANDROID)
471 void OnSetWebKitSharedTimersSuspended(bool suspend
);
473 #if defined(OS_MACOSX)
474 void OnUpdateScrollbarTheme(
475 const ViewMsg_UpdateScrollbarTheme_Params
& params
);
477 void OnCreateNewSharedWorker(
478 const WorkerProcessMsg_CreateWorker_Params
& params
);
479 bool RendererIsHidden() const;
480 void OnRendererHidden();
481 void OnRendererVisible();
483 void ReleaseFreeMemory();
485 scoped_ptr
<WebGraphicsContext3DCommandBufferImpl
> CreateOffscreenContext3d();
487 // These objects live solely on the render thread.
488 scoped_ptr
<AppCacheDispatcher
> appcache_dispatcher_
;
489 scoped_ptr
<DomStorageDispatcher
> dom_storage_dispatcher_
;
490 scoped_ptr
<IndexedDBDispatcher
> main_thread_indexed_db_dispatcher_
;
491 scoped_ptr
<scheduler::RendererScheduler
> renderer_scheduler_
;
492 scoped_ptr
<RendererBlinkPlatformImpl
> blink_platform_impl_
;
493 scoped_ptr
<ResourceDispatchThrottler
> resource_dispatch_throttler_
;
494 scoped_ptr
<CacheStorageDispatcher
> main_thread_cache_storage_dispatcher_
;
495 scoped_ptr
<EmbeddedWorkerDispatcher
> embedded_worker_dispatcher_
;
497 // Used on the render thread and deleted by WebKit at shutdown.
498 blink::WebMediaStreamCenter
* media_stream_center_
;
500 // Used on the renderer and IPC threads.
501 scoped_refptr
<DBMessageFilter
> db_message_filter_
;
502 scoped_refptr
<AudioInputMessageFilter
> audio_input_message_filter_
;
503 scoped_refptr
<AudioMessageFilter
> audio_message_filter_
;
504 scoped_refptr
<MidiMessageFilter
> midi_message_filter_
;
505 #if defined(OS_ANDROID)
506 scoped_refptr
<RendererDemuxerAndroid
> renderer_demuxer_
;
508 scoped_refptr
<DevToolsAgentFilter
> devtools_agent_message_filter_
;
509 scoped_ptr
<V8SamplingProfiler
> v8_sampling_profiler_
;
511 scoped_ptr
<BrowserPluginManager
> browser_plugin_manager_
;
513 #if defined(ENABLE_WEBRTC)
514 scoped_ptr
<PeerConnectionDependencyFactory
> peer_connection_factory_
;
516 // This is used to communicate to the browser process the status
517 // of all the peer connections created in the renderer.
518 scoped_ptr
<PeerConnectionTracker
> peer_connection_tracker_
;
520 // Dispatches all P2P sockets.
521 scoped_refptr
<P2PSocketDispatcher
> p2p_socket_dispatcher_
;
524 // Used on the render thread.
525 scoped_ptr
<VideoCaptureImplManager
> vc_manager_
;
527 // Used for communicating registering AEC dump consumers with the browser and
528 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is
529 // diagnostic audio data for WebRTC stored locally when enabled by the user in
530 // chrome://webrtc-internals.
531 scoped_refptr
<AecDumpMessageFilter
> aec_dump_message_filter_
;
533 // The count of RenderWidgets running through this thread.
536 // The count of hidden RenderWidgets running through this thread.
537 int hidden_widget_count_
;
539 // The current value of the idle notification timer delay.
540 int64 idle_notification_delay_in_ms_
;
542 // The number of idle handler calls that skip sending idle notifications.
543 int idle_notifications_to_skip_
;
545 bool notify_webkit_of_modal_loop_
;
546 bool webkit_shared_timer_suspended_
;
548 // The following flag is used to control layout test specific behavior.
549 bool layout_test_mode_
;
551 // Timer that periodically calls IdleHandler.
552 base::RepeatingTimer
<RenderThreadImpl
> idle_timer_
;
554 // The channel from the renderer process to the GPU process.
555 scoped_refptr
<GpuChannelHost
> gpu_channel_
;
557 // Cache of variables that are needed on the compositor thread by
558 // GpuChannelHostFactory methods.
559 scoped_refptr
<base::SingleThreadTaskRunner
> io_thread_task_runner_
;
561 // The message loop of the renderer main thread.
562 // This message loop should be destructed before the RenderThreadImpl
564 scoped_ptr
<base::MessageLoop
> main_message_loop_
;
566 // A lazily initiated thread on which file operations are run.
567 scoped_ptr
<base::Thread
> file_thread_
;
569 // May be null if overridden by ContentRendererClient.
570 scoped_ptr
<base::Thread
> compositor_thread_
;
572 // Thread for running multimedia operations (e.g., video decoding).
573 scoped_ptr
<base::Thread
> media_thread_
;
575 // Will point to appropriate task runner after initialization,
576 // regardless of whether |compositor_thread_| is overriden.
577 scoped_refptr
<base::SingleThreadTaskRunner
> compositor_task_runner_
;
579 // Pool of workers used for raster operations (e.g., tile rasterization).
580 scoped_refptr
<RasterWorkerPool
> raster_worker_pool_
;
582 base::CancelableCallback
<void(const IPC::Message
&)> main_input_callback_
;
583 scoped_refptr
<IPC::MessageFilter
> input_event_filter_
;
584 scoped_ptr
<InputHandlerManager
> input_handler_manager_
;
585 scoped_refptr
<CompositorForwardingMessageFilter
> compositor_message_filter_
;
587 scoped_refptr
<BluetoothMessageFilter
> bluetooth_message_filter_
;
589 scoped_refptr
<cc_blink::ContextProviderWebContext
>
590 shared_main_thread_contexts_
;
592 base::ObserverList
<RenderProcessObserver
> observers_
;
594 scoped_refptr
<ContextProviderCommandBuffer
> gpu_va_context_provider_
;
596 scoped_ptr
<AudioRendererMixerManager
> audio_renderer_mixer_manager_
;
597 scoped_ptr
<media::AudioHardwareConfig
> audio_hardware_config_
;
599 HistogramCustomizer histogram_customizer_
;
601 scoped_ptr
<base::MemoryPressureListener
> memory_pressure_listener_
;
603 #if defined(ENABLE_WEBRTC)
604 scoped_ptr
<WebRTCIdentityService
> webrtc_identity_service_
;
607 scoped_ptr
<MemoryObserver
> memory_observer_
;
609 scoped_refptr
<base::SingleThreadTaskRunner
>
610 main_thread_compositor_task_runner_
;
612 scoped_refptr
<ResourceSchedulingFilter
> resource_scheduling_filter_
;
614 // Compositor settings.
615 bool is_gpu_rasterization_enabled_
;
616 bool is_gpu_rasterization_forced_
;
617 int gpu_rasterization_msaa_sample_count_
;
618 bool is_lcd_text_enabled_
;
619 bool is_distance_field_text_enabled_
;
620 bool is_zero_copy_enabled_
;
621 bool is_one_copy_enabled_
;
622 bool is_persistent_gpu_memory_buffer_enabled_
;
623 bool is_elastic_overscroll_enabled_
;
624 std::vector
<unsigned> use_image_texture_targets_
;
625 bool is_gather_pixel_refs_enabled_
;
626 bool is_threaded_animation_enabled_
;
628 class PendingRenderFrameConnect
629 : public base::RefCounted
<PendingRenderFrameConnect
> {
631 PendingRenderFrameConnect(
633 mojo::InterfaceRequest
<mojo::ServiceProvider
> services
,
634 mojo::ServiceProviderPtr exposed_services
);
636 mojo::InterfaceRequest
<mojo::ServiceProvider
>& services() {
640 mojo::ServiceProviderPtr
& exposed_services() { return exposed_services_
; }
643 friend class base::RefCounted
<PendingRenderFrameConnect
>;
645 ~PendingRenderFrameConnect();
647 // Mojo error handler.
648 void OnConnectionError();
651 mojo::InterfaceRequest
<mojo::ServiceProvider
> services_
;
652 mojo::ServiceProviderPtr exposed_services_
;
655 typedef std::map
<int, scoped_refptr
<PendingRenderFrameConnect
>>
656 PendingRenderFrameConnectMap
;
657 PendingRenderFrameConnectMap pending_render_frame_connects_
;
659 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl
);
662 #if defined(COMPILER_MSVC)
666 } // namespace content
668 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_