| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 namespace IPC { | 89 namespace IPC { |
| 90 class MessageFilter; | 90 class MessageFilter; |
| 91 } | 91 } |
| 92 | 92 |
| 93 namespace media { | 93 namespace media { |
| 94 class GpuVideoAcceleratorFactories; | 94 class GpuVideoAcceleratorFactories; |
| 95 } | 95 } |
| 96 | 96 |
| 97 namespace ui { | 97 namespace ui { |
| 98 class ChildSharedBitmapManager; |
| 98 class ContextProviderCommandBuffer; | 99 class ContextProviderCommandBuffer; |
| 99 class Gpu; | 100 class Gpu; |
| 100 } | 101 } |
| 101 | 102 |
| 102 namespace v8 { | 103 namespace v8 { |
| 103 class Extension; | 104 class Extension; |
| 104 } | 105 } |
| 105 | 106 |
| 106 namespace content { | 107 namespace content { |
| 107 | 108 |
| 108 class AppCacheDispatcher; | 109 class AppCacheDispatcher; |
| 109 class AecDumpMessageFilter; | 110 class AecDumpMessageFilter; |
| 110 class AudioInputMessageFilter; | 111 class AudioInputMessageFilter; |
| 111 class AudioMessageFilter; | 112 class AudioMessageFilter; |
| 112 class AudioRendererMixerManager; | 113 class AudioRendererMixerManager; |
| 113 class BlobMessageFilter; | 114 class BlobMessageFilter; |
| 114 class BrowserPluginManager; | 115 class BrowserPluginManager; |
| 115 class CacheStorageDispatcher; | 116 class CacheStorageDispatcher; |
| 116 class ChildSharedBitmapManager; | |
| 117 class CompositorForwardingMessageFilter; | 117 class CompositorForwardingMessageFilter; |
| 118 class DBMessageFilter; | 118 class DBMessageFilter; |
| 119 class DevToolsAgentFilter; | 119 class DevToolsAgentFilter; |
| 120 class DomStorageDispatcher; | 120 class DomStorageDispatcher; |
| 121 class EmbeddedWorkerDispatcher; | 121 class EmbeddedWorkerDispatcher; |
| 122 class FrameSwapMessageQueue; | 122 class FrameSwapMessageQueue; |
| 123 class IndexedDBDispatcher; | 123 class IndexedDBDispatcher; |
| 124 class InputHandlerManager; | 124 class InputHandlerManager; |
| 125 class MemoryObserver; | 125 class MemoryObserver; |
| 126 class MidiMessageFilter; | 126 class MidiMessageFilter; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 public base::FieldTrialList::Observer, | 163 public base::FieldTrialList::Observer, |
| 164 NON_EXPORTED_BASE(public mojom::Renderer), | 164 NON_EXPORTED_BASE(public mojom::Renderer), |
| 165 NON_EXPORTED_BASE(public CompositorDependencies) { | 165 NON_EXPORTED_BASE(public CompositorDependencies) { |
| 166 public: | 166 public: |
| 167 static RenderThreadImpl* Create(const InProcessChildThreadParams& params); | 167 static RenderThreadImpl* Create(const InProcessChildThreadParams& params); |
| 168 static RenderThreadImpl* Create( | 168 static RenderThreadImpl* Create( |
| 169 std::unique_ptr<base::MessageLoop> main_message_loop, | 169 std::unique_ptr<base::MessageLoop> main_message_loop, |
| 170 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler); | 170 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler); |
| 171 static RenderThreadImpl* current(); | 171 static RenderThreadImpl* current(); |
| 172 static mojom::RenderMessageFilter* current_render_message_filter(); | 172 static mojom::RenderMessageFilter* current_render_message_filter(); |
| 173 static const scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr>& | |
| 174 current_thread_safe_render_message_filter(); | |
| 175 | 173 |
| 176 static void SetRenderMessageFilterForTesting( | 174 static void SetRenderMessageFilterForTesting( |
| 177 mojom::RenderMessageFilter* render_message_filter); | 175 mojom::RenderMessageFilter* render_message_filter); |
| 178 | 176 |
| 179 ~RenderThreadImpl() override; | 177 ~RenderThreadImpl() override; |
| 180 void Shutdown() override; | 178 void Shutdown() override; |
| 181 bool ShouldBeDestroyed() override; | 179 bool ShouldBeDestroyed() override; |
| 182 | 180 |
| 183 // When initializing WebKit, ensure that any schemes needed for the content | 181 // When initializing WebKit, ensure that any schemes needed for the content |
| 184 // module are registered properly. Static to allow sharing with tests. | 182 // module are registered properly. Static to allow sharing with tests. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. | 353 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. |
| 356 P2PSocketDispatcher* p2p_socket_dispatcher() { | 354 P2PSocketDispatcher* p2p_socket_dispatcher() { |
| 357 return p2p_socket_dispatcher_.get(); | 355 return p2p_socket_dispatcher_.get(); |
| 358 } | 356 } |
| 359 #endif | 357 #endif |
| 360 | 358 |
| 361 VideoCaptureImplManager* video_capture_impl_manager() const { | 359 VideoCaptureImplManager* video_capture_impl_manager() const { |
| 362 return vc_manager_.get(); | 360 return vc_manager_.get(); |
| 363 } | 361 } |
| 364 | 362 |
| 365 ChildSharedBitmapManager* shared_bitmap_manager() const { | 363 ui::ChildSharedBitmapManager* shared_bitmap_manager() const { |
| 366 DCHECK(shared_bitmap_manager_); | 364 DCHECK(shared_bitmap_manager_); |
| 367 return shared_bitmap_manager_.get(); | 365 return shared_bitmap_manager_.get(); |
| 368 } | 366 } |
| 369 | 367 |
| 370 mojom::RenderFrameMessageFilter* render_frame_message_filter(); | 368 mojom::RenderFrameMessageFilter* render_frame_message_filter(); |
| 371 mojom::RenderMessageFilter* render_message_filter(); | 369 mojom::RenderMessageFilter* render_message_filter(); |
| 372 const scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr>& | |
| 373 thread_safe_render_message_filter(); | |
| 374 | 370 |
| 375 // Get the GPU channel. Returns NULL if the channel is not established or | 371 // Get the GPU channel. Returns NULL if the channel is not established or |
| 376 // has been lost. | 372 // has been lost. |
| 377 gpu::GpuChannelHost* GetGpuChannel(); | 373 gpu::GpuChannelHost* GetGpuChannel(); |
| 378 | 374 |
| 379 // Returns a SingleThreadTaskRunner instance corresponding to the message loop | 375 // Returns a SingleThreadTaskRunner instance corresponding to the message loop |
| 380 // of the thread on which file operations should be run. Must be called | 376 // of the thread on which file operations should be run. Must be called |
| 381 // on the renderer's main thread. | 377 // on the renderer's main thread. |
| 382 scoped_refptr<base::SingleThreadTaskRunner> GetFileThreadTaskRunner(); | 378 scoped_refptr<base::SingleThreadTaskRunner> GetFileThreadTaskRunner(); |
| 383 | 379 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 // Used for communicating registering AEC dump consumers with the browser and | 632 // Used for communicating registering AEC dump consumers with the browser and |
| 637 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is | 633 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is |
| 638 // diagnostic audio data for WebRTC stored locally when enabled by the user in | 634 // diagnostic audio data for WebRTC stored locally when enabled by the user in |
| 639 // chrome://webrtc-internals. | 635 // chrome://webrtc-internals. |
| 640 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; | 636 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; |
| 641 #endif | 637 #endif |
| 642 | 638 |
| 643 // Used on the render thread. | 639 // Used on the render thread. |
| 644 std::unique_ptr<VideoCaptureImplManager> vc_manager_; | 640 std::unique_ptr<VideoCaptureImplManager> vc_manager_; |
| 645 | 641 |
| 646 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; | 642 std::unique_ptr<ui::ChildSharedBitmapManager> shared_bitmap_manager_; |
| 647 | 643 |
| 648 // The count of RenderWidgets running through this thread. | 644 // The count of RenderWidgets running through this thread. |
| 649 int widget_count_; | 645 int widget_count_; |
| 650 | 646 |
| 651 // The count of hidden RenderWidgets running through this thread. | 647 // The count of hidden RenderWidgets running through this thread. |
| 652 int hidden_widget_count_; | 648 int hidden_widget_count_; |
| 653 | 649 |
| 654 // The current value of the idle notification timer delay. | 650 // The current value of the idle notification timer delay. |
| 655 int64_t idle_notification_delay_in_ms_; | 651 int64_t idle_notification_delay_in_ms_; |
| 656 | 652 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 PendingFrameCreateMap pending_frame_creates_; | 769 PendingFrameCreateMap pending_frame_creates_; |
| 774 | 770 |
| 775 mojom::StoragePartitionServicePtr storage_partition_service_; | 771 mojom::StoragePartitionServicePtr storage_partition_service_; |
| 776 | 772 |
| 777 AssociatedInterfaceRegistryImpl associated_interfaces_; | 773 AssociatedInterfaceRegistryImpl associated_interfaces_; |
| 778 | 774 |
| 779 mojo::AssociatedBinding<mojom::Renderer> renderer_binding_; | 775 mojo::AssociatedBinding<mojom::Renderer> renderer_binding_; |
| 780 | 776 |
| 781 mojom::RenderFrameMessageFilterAssociatedPtr render_frame_message_filter_; | 777 mojom::RenderFrameMessageFilterAssociatedPtr render_frame_message_filter_; |
| 782 mojom::RenderMessageFilterAssociatedPtr render_message_filter_; | 778 mojom::RenderMessageFilterAssociatedPtr render_message_filter_; |
| 783 scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr> | |
| 784 thread_safe_render_message_filter_; | |
| 785 | 779 |
| 786 base::CancelableClosure record_purge_suspend_metric_closure_; | 780 base::CancelableClosure record_purge_suspend_metric_closure_; |
| 787 RendererMemoryMetrics purge_and_suspend_memory_metrics_; | 781 RendererMemoryMetrics purge_and_suspend_memory_metrics_; |
| 788 base::CancelableClosure record_purge_suspend_growth_metric_closure_; | 782 base::CancelableClosure record_purge_suspend_growth_metric_closure_; |
| 789 bool needs_to_record_first_active_paint_; | 783 bool needs_to_record_first_active_paint_; |
| 790 | 784 |
| 791 int32_t client_id_; | 785 int32_t client_id_; |
| 792 | 786 |
| 793 variations::ChildProcessFieldTrialSyncer field_trial_syncer_; | 787 variations::ChildProcessFieldTrialSyncer field_trial_syncer_; |
| 794 | 788 |
| 795 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 789 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 796 }; | 790 }; |
| 797 | 791 |
| 798 #if defined(COMPILER_MSVC) | 792 #if defined(COMPILER_MSVC) |
| 799 #pragma warning(pop) | 793 #pragma warning(pop) |
| 800 #endif | 794 #endif |
| 801 | 795 |
| 802 } // namespace content | 796 } // namespace content |
| 803 | 797 |
| 804 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 798 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |