| 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 14 matching lines...) Expand all Loading... |
| 25 #include "content/child/child_thread_impl.h" | 25 #include "content/child/child_thread_impl.h" |
| 26 #include "content/child/memory/child_memory_coordinator_impl.h" | 26 #include "content/child/memory/child_memory_coordinator_impl.h" |
| 27 #include "content/common/content_export.h" | 27 #include "content/common/content_export.h" |
| 28 #include "content/common/frame.mojom.h" | 28 #include "content/common/frame.mojom.h" |
| 29 #include "content/common/frame_replication_state.h" | 29 #include "content/common/frame_replication_state.h" |
| 30 #include "content/common/render_frame_message_filter.mojom.h" | 30 #include "content/common/render_frame_message_filter.mojom.h" |
| 31 #include "content/common/storage_partition_service.mojom.h" | 31 #include "content/common/storage_partition_service.mojom.h" |
| 32 #include "content/public/renderer/render_thread.h" | 32 #include "content/public/renderer/render_thread.h" |
| 33 #include "content/renderer/gpu/compositor_dependencies.h" | 33 #include "content/renderer/gpu/compositor_dependencies.h" |
| 34 #include "content/renderer/layout_test_dependencies.h" | 34 #include "content/renderer/layout_test_dependencies.h" |
| 35 #include "device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom.h" |
| 35 #include "gpu/ipc/client/gpu_channel_host.h" | 36 #include "gpu/ipc/client/gpu_channel_host.h" |
| 37 #include "mojo/public/cpp/bindings/binding.h" |
| 36 #include "net/base/network_change_notifier.h" | 38 #include "net/base/network_change_notifier.h" |
| 37 #include "third_party/WebKit/public/platform/WebConnectionType.h" | 39 #include "third_party/WebKit/public/platform/WebConnectionType.h" |
| 38 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" | 40 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" |
| 39 #include "ui/gfx/native_widget_types.h" | 41 #include "ui/gfx/native_widget_types.h" |
| 40 | 42 |
| 41 #if defined(OS_MACOSX) | 43 #if defined(OS_MACOSX) |
| 42 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" | 44 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" |
| 43 #endif | 45 #endif |
| 44 | 46 |
| 45 class GrContext; | 47 class GrContext; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // | 146 // |
| 145 // Most of the communication occurs in the form of IPC messages. They are | 147 // Most of the communication occurs in the form of IPC messages. They are |
| 146 // routed to the RenderThread according to the routing IDs of the messages. | 148 // routed to the RenderThread according to the routing IDs of the messages. |
| 147 // The routing IDs correspond to RenderView instances. | 149 // The routing IDs correspond to RenderView instances. |
| 148 class CONTENT_EXPORT RenderThreadImpl | 150 class CONTENT_EXPORT RenderThreadImpl |
| 149 : public RenderThread, | 151 : public RenderThread, |
| 150 public ChildThreadImpl, | 152 public ChildThreadImpl, |
| 151 public gpu::GpuChannelHostFactory, | 153 public gpu::GpuChannelHostFactory, |
| 152 public blink::scheduler::RendererScheduler::RAILModeObserver, | 154 public blink::scheduler::RendererScheduler::RAILModeObserver, |
| 153 public ChildMemoryCoordinatorDelegate, | 155 public ChildMemoryCoordinatorDelegate, |
| 156 // TODO(blundell): Separate this impl out into Blink. |
| 157 NON_EXPORTED_BASE(public device::mojom::TimeZoneMonitorClient), |
| 154 NON_EXPORTED_BASE(public CompositorDependencies) { | 158 NON_EXPORTED_BASE(public CompositorDependencies) { |
| 155 public: | 159 public: |
| 156 static RenderThreadImpl* Create(const InProcessChildThreadParams& params); | 160 static RenderThreadImpl* Create(const InProcessChildThreadParams& params); |
| 157 static RenderThreadImpl* Create( | 161 static RenderThreadImpl* Create( |
| 158 std::unique_ptr<base::MessageLoop> main_message_loop, | 162 std::unique_ptr<base::MessageLoop> main_message_loop, |
| 159 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler); | 163 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler); |
| 160 static RenderThreadImpl* current(); | 164 static RenderThreadImpl* current(); |
| 161 | 165 |
| 162 ~RenderThreadImpl() override; | 166 ~RenderThreadImpl() override; |
| 163 void Shutdown() override; | 167 void Shutdown() override; |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 const FrameReplicationState& replicated_state); | 498 const FrameReplicationState& replicated_state); |
| 495 void OnCreateNewView(const ViewMsg_New_Params& params); | 499 void OnCreateNewView(const ViewMsg_New_Params& params); |
| 496 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 500 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
| 497 #if defined(ENABLE_PLUGINS) | 501 #if defined(ENABLE_PLUGINS) |
| 498 void OnPurgePluginListCache(bool reload_pages); | 502 void OnPurgePluginListCache(bool reload_pages); |
| 499 #endif | 503 #endif |
| 500 void OnNetworkConnectionChanged( | 504 void OnNetworkConnectionChanged( |
| 501 net::NetworkChangeNotifier::ConnectionType type, | 505 net::NetworkChangeNotifier::ConnectionType type, |
| 502 double max_bandwidth_mbps); | 506 double max_bandwidth_mbps); |
| 503 void OnGetAccessibilityTree(); | 507 void OnGetAccessibilityTree(); |
| 504 void OnUpdateTimezone(const std::string& zoneId); | 508 |
| 509 // device::mojom::TimeZoneClient: |
| 510 void OnTimeZoneChange(const std::string& zoneId) override; |
| 505 void OnMemoryPressure( | 511 void OnMemoryPressure( |
| 506 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 512 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
| 507 #if defined(OS_ANDROID) | 513 #if defined(OS_ANDROID) |
| 508 void OnSetWebKitSharedTimersSuspended(bool suspend); | 514 void OnSetWebKitSharedTimersSuspended(bool suspend); |
| 509 #endif | 515 #endif |
| 510 #if defined(OS_MACOSX) | 516 #if defined(OS_MACOSX) |
| 511 void OnUpdateScrollbarTheme( | 517 void OnUpdateScrollbarTheme( |
| 512 const ViewMsg_UpdateScrollbarTheme_Params& params); | 518 const ViewMsg_UpdateScrollbarTheme_Params& params); |
| 513 void OnSystemColorsChanged(int aqua_color_variant, | 519 void OnSystemColorsChanged(int aqua_color_variant, |
| 514 const std::string& highlight_text_color, | 520 const std::string& highlight_text_color, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 // Dispatches all P2P sockets. | 571 // Dispatches all P2P sockets. |
| 566 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; | 572 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; |
| 567 | 573 |
| 568 // Used for communicating registering AEC dump consumers with the browser and | 574 // Used for communicating registering AEC dump consumers with the browser and |
| 569 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is | 575 // receving AEC dump file handles when AEC dump is enabled. An AEC dump is |
| 570 // diagnostic audio data for WebRTC stored locally when enabled by the user in | 576 // diagnostic audio data for WebRTC stored locally when enabled by the user in |
| 571 // chrome://webrtc-internals. | 577 // chrome://webrtc-internals. |
| 572 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; | 578 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; |
| 573 #endif | 579 #endif |
| 574 | 580 |
| 581 mojo::Binding<device::mojom::TimeZoneMonitorClient> |
| 582 time_zone_monitor_binding_; |
| 583 |
| 575 // Used on the render thread. | 584 // Used on the render thread. |
| 576 std::unique_ptr<VideoCaptureImplManager> vc_manager_; | 585 std::unique_ptr<VideoCaptureImplManager> vc_manager_; |
| 577 | 586 |
| 578 // The count of RenderWidgets running through this thread. | 587 // The count of RenderWidgets running through this thread. |
| 579 int widget_count_; | 588 int widget_count_; |
| 580 | 589 |
| 581 // The count of hidden RenderWidgets running through this thread. | 590 // The count of hidden RenderWidgets running through this thread. |
| 582 int hidden_widget_count_; | 591 int hidden_widget_count_; |
| 583 | 592 |
| 584 // The current value of the idle notification timer delay. | 593 // The current value of the idle notification timer delay. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 723 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 715 }; | 724 }; |
| 716 | 725 |
| 717 #if defined(COMPILER_MSVC) | 726 #if defined(COMPILER_MSVC) |
| 718 #pragma warning(pop) | 727 #pragma warning(pop) |
| 719 #endif | 728 #endif |
| 720 | 729 |
| 721 } // namespace content | 730 } // namespace content |
| 722 | 731 |
| 723 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 732 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |