| 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 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/cancelable_callback.h" | 15 #include "base/cancelable_callback.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/memory_pressure_listener.h" | 17 #include "base/memory/memory_pressure_listener.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/metrics/user_metrics_action.h" | 19 #include "base/metrics/user_metrics_action.h" |
| 20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 21 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
| 22 #include "base/threading/thread_checker.h" | 22 #include "base/threading/thread_checker.h" |
| 23 #include "base/timer/timer.h" | 23 #include "base/timer/timer.h" |
| 24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
| 25 #include "content/child/child_thread_impl.h" | 25 #include "content/child/child_thread_impl.h" |
| 26 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 27 #include "content/common/frame_replication_state.h" | 27 #include "content/common/frame_replication_state.h" |
| 28 #include "content/common/gpu/client/gpu_channel_host.h" | 28 #include "content/common/gpu/client/gpu_channel_host.h" |
| 29 #include "content/common/gpu/client/gpu_channel_host_factory.h" |
| 30 #include "content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.h" |
| 29 #include "content/common/gpu/gpu_result_codes.h" | 31 #include "content/common/gpu/gpu_result_codes.h" |
| 30 #include "content/public/renderer/render_thread.h" | 32 #include "content/public/renderer/render_thread.h" |
| 31 #include "content/renderer/gpu/compositor_dependencies.h" | 33 #include "content/renderer/gpu/compositor_dependencies.h" |
| 32 #include "net/base/network_change_notifier.h" | 34 #include "net/base/network_change_notifier.h" |
| 33 #include "third_party/WebKit/public/platform/WebConnectionType.h" | 35 #include "third_party/WebKit/public/platform/WebConnectionType.h" |
| 34 #include "ui/gfx/native_widget_types.h" | 36 #include "ui/gfx/native_widget_types.h" |
| 35 | 37 |
| 36 #if defined(OS_MACOSX) | 38 #if defined(OS_MACOSX) |
| 37 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" | 39 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" |
| 38 #endif | 40 #endif |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 // ChildThread | 464 // ChildThread |
| 463 bool OnControlMessageReceived(const IPC::Message& msg) override; | 465 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 464 void OnProcessBackgrounded(bool backgrounded) override; | 466 void OnProcessBackgrounded(bool backgrounded) override; |
| 465 | 467 |
| 466 // GpuChannelHostFactory implementation: | 468 // GpuChannelHostFactory implementation: |
| 467 bool IsMainThread() override; | 469 bool IsMainThread() override; |
| 468 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; | 470 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; |
| 469 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; | 471 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; |
| 470 CreateCommandBufferResult CreateViewCommandBuffer( | 472 CreateCommandBufferResult CreateViewCommandBuffer( |
| 471 int32_t surface_id, | 473 int32_t surface_id, |
| 472 const GPUCreateCommandBufferConfig& init_params, | 474 const GpuCreateCommandBufferConfig& init_params, |
| 473 int32_t route_id) override; | 475 int32_t route_id) override; |
| 474 | 476 |
| 475 void Init(); | 477 void Init(); |
| 476 | 478 |
| 477 void InitializeCompositorThread(); | 479 void InitializeCompositorThread(); |
| 478 | 480 |
| 479 void OnCreateNewFrame(FrameMsg_NewFrame_Params params); | 481 void OnCreateNewFrame(FrameMsg_NewFrame_Params params); |
| 480 void OnCreateNewFrameProxy(int routing_id, | 482 void OnCreateNewFrameProxy(int routing_id, |
| 481 int render_view_routing_id, | 483 int render_view_routing_id, |
| 482 int opener_routing_id, | 484 int opener_routing_id, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 691 |
| 690 int routing_id_; | 692 int routing_id_; |
| 691 mojo::InterfaceRequest<mojo::ServiceProvider> services_; | 693 mojo::InterfaceRequest<mojo::ServiceProvider> services_; |
| 692 mojo::ServiceProviderPtr exposed_services_; | 694 mojo::ServiceProviderPtr exposed_services_; |
| 693 }; | 695 }; |
| 694 | 696 |
| 695 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> | 697 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> |
| 696 PendingRenderFrameConnectMap; | 698 PendingRenderFrameConnectMap; |
| 697 PendingRenderFrameConnectMap pending_render_frame_connects_; | 699 PendingRenderFrameConnectMap pending_render_frame_connects_; |
| 698 | 700 |
| 701 GpuHostIPCTransportFactoryImpl transport_factory_; |
| 702 |
| 699 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 703 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 700 }; | 704 }; |
| 701 | 705 |
| 702 #if defined(COMPILER_MSVC) | 706 #if defined(COMPILER_MSVC) |
| 703 #pragma warning(pop) | 707 #pragma warning(pop) |
| 704 #endif | 708 #endif |
| 705 | 709 |
| 706 } // namespace content | 710 } // namespace content |
| 707 | 711 |
| 708 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 712 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |