| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/memory/memory_pressure_listener.h" | 12 #include "base/memory/memory_pressure_listener.h" |
| 13 #include "base/metrics/user_metrics_action.h" | 13 #include "base/metrics/user_metrics_action.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "cc/trees/main_thread_task_runner.h" |
| 19 #include "content/child/child_thread.h" | 20 #include "content/child/child_thread.h" |
| 20 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
| 21 #include "content/common/gpu/client/gpu_channel_host.h" | 22 #include "content/common/gpu/client/gpu_channel_host.h" |
| 22 #include "content/public/renderer/render_thread.h" | 23 #include "content/public/renderer/render_thread.h" |
| 23 #include "net/base/network_change_notifier.h" | 24 #include "net/base/network_change_notifier.h" |
| 24 #include "third_party/WebKit/public/platform/WebConnectionType.h" | 25 #include "third_party/WebKit/public/platform/WebConnectionType.h" |
| 25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
| 26 | 27 |
| 27 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
| 28 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" | 29 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" |
| 29 #endif | 30 #endif |
| 30 | 31 |
| 31 class GrContext; | 32 class GrContext; |
| 32 class SkBitmap; | 33 class SkBitmap; |
| 33 struct ViewMsg_New_Params; | 34 struct ViewMsg_New_Params; |
| 34 struct WorkerProcessMsg_CreateWorker_Params; | 35 struct WorkerProcessMsg_CreateWorker_Params; |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 class WebGamepads; | 38 class WebGamepads; |
| 38 class WebGamepadListener; | 39 class WebGamepadListener; |
| 39 class WebGraphicsContext3D; | 40 class WebGraphicsContext3D; |
| 40 class WebMediaStreamCenter; | 41 class WebMediaStreamCenter; |
| 41 class WebMediaStreamCenterClient; | 42 class WebMediaStreamCenterClient; |
| 42 } | 43 } |
| 43 | 44 |
| 44 namespace base { | 45 namespace base { |
| 45 class MessageLoopProxy; | 46 class MessageLoopProxy; |
| 47 class SingleThreadTaskRunner; |
| 46 class Thread; | 48 class Thread; |
| 47 } | 49 } |
| 48 | 50 |
| 49 namespace cc { | 51 namespace cc { |
| 50 class ContextProvider; | 52 class ContextProvider; |
| 51 } | 53 } |
| 52 | 54 |
| 53 namespace IPC { | 55 namespace IPC { |
| 54 class ForwardingMessageFilter; | 56 class ForwardingMessageFilter; |
| 55 class MessageFilter; | 57 class MessageFilter; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 193 } |
| 192 void set_layout_test_mode(bool layout_test_mode) { | 194 void set_layout_test_mode(bool layout_test_mode) { |
| 193 layout_test_mode_ = layout_test_mode; | 195 layout_test_mode_ = layout_test_mode; |
| 194 } | 196 } |
| 195 | 197 |
| 196 RendererWebKitPlatformSupportImpl* webkit_platform_support() const { | 198 RendererWebKitPlatformSupportImpl* webkit_platform_support() const { |
| 197 DCHECK(webkit_platform_support_); | 199 DCHECK(webkit_platform_support_); |
| 198 return webkit_platform_support_.get(); | 200 return webkit_platform_support_.get(); |
| 199 } | 201 } |
| 200 | 202 |
| 203 scoped_refptr<cc::MainThreadTaskRunner> main_thread_task_runner() const { |
| 204 return main_thread_task_runner_; |
| 205 } |
| 206 |
| 201 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const { | 207 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const { |
| 202 return compositor_output_surface_filter_.get(); | 208 return compositor_output_surface_filter_.get(); |
| 203 } | 209 } |
| 204 | 210 |
| 205 InputHandlerManager* input_handler_manager() const { | 211 InputHandlerManager* input_handler_manager() const { |
| 206 return input_handler_manager_.get(); | 212 return input_handler_manager_.get(); |
| 207 } | 213 } |
| 208 | 214 |
| 209 // Will be NULL if threaded compositing has not been enabled. | 215 // Will be NULL if threaded compositing has not been enabled. |
| 210 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy() const { | 216 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy() const { |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 566 |
| 561 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; | 567 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; |
| 562 | 568 |
| 563 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 569 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 564 | 570 |
| 565 // TODO(reveman): Allow AllocateGpuMemoryBuffer to be called from | 571 // TODO(reveman): Allow AllocateGpuMemoryBuffer to be called from |
| 566 // multiple threads. Current allocation mechanism for IOSurface | 572 // multiple threads. Current allocation mechanism for IOSurface |
| 567 // backed GpuMemoryBuffers prevent this. crbug.com/325045 | 573 // backed GpuMemoryBuffers prevent this. crbug.com/325045 |
| 568 base::ThreadChecker allocate_gpu_memory_buffer_thread_checker_; | 574 base::ThreadChecker allocate_gpu_memory_buffer_thread_checker_; |
| 569 | 575 |
| 576 scoped_refptr<cc::MainThreadTaskRunner> main_thread_task_runner_; |
| 577 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; |
| 578 |
| 570 // Compositor settings | 579 // Compositor settings |
| 571 bool is_gpu_rasterization_enabled_; | 580 bool is_gpu_rasterization_enabled_; |
| 572 bool is_gpu_rasterization_forced_; | 581 bool is_gpu_rasterization_forced_; |
| 573 bool is_impl_side_painting_enabled_; | 582 bool is_impl_side_painting_enabled_; |
| 574 bool is_low_res_tiling_enabled_; | 583 bool is_low_res_tiling_enabled_; |
| 575 bool is_lcd_text_enabled_; | 584 bool is_lcd_text_enabled_; |
| 576 bool is_distance_field_text_enabled_; | 585 bool is_distance_field_text_enabled_; |
| 577 bool is_zero_copy_enabled_; | 586 bool is_zero_copy_enabled_; |
| 578 bool is_one_copy_enabled_; | 587 bool is_one_copy_enabled_; |
| 579 | 588 |
| 580 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; | 589 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; |
| 581 | 590 |
| 582 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 591 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 583 }; | 592 }; |
| 584 | 593 |
| 585 } // namespace content | 594 } // namespace content |
| 586 | 595 |
| 587 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 596 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |