| 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> |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 protected: | 420 protected: |
| 421 virtual void SetResourceDispatchTaskQueue( | 421 virtual void SetResourceDispatchTaskQueue( |
| 422 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 422 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 423 | 423 |
| 424 private: | 424 private: |
| 425 // ChildThread | 425 // ChildThread |
| 426 bool OnControlMessageReceived(const IPC::Message& msg) override; | 426 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 427 | 427 |
| 428 // GpuChannelHostFactory implementation: | 428 // GpuChannelHostFactory implementation: |
| 429 bool IsMainThread() override; | 429 bool IsMainThread() override; |
| 430 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; | 430 scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override; |
| 431 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; | 431 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; |
| 432 CreateCommandBufferResult CreateViewCommandBuffer( | 432 CreateCommandBufferResult CreateViewCommandBuffer( |
| 433 int32 surface_id, | 433 int32 surface_id, |
| 434 const GPUCreateCommandBufferConfig& init_params, | 434 const GPUCreateCommandBufferConfig& init_params, |
| 435 int32 route_id) override; | 435 int32 route_id) override; |
| 436 | 436 |
| 437 void Init(); | 437 void Init(); |
| 438 | 438 |
| 439 void OnCreateNewFrame(FrameMsg_NewFrame_Params params); | 439 void OnCreateNewFrame(FrameMsg_NewFrame_Params params); |
| 440 void OnCreateNewFrameProxy(int routing_id, | 440 void OnCreateNewFrameProxy(int routing_id, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 bool layout_test_mode_; | 538 bool layout_test_mode_; |
| 539 | 539 |
| 540 // Timer that periodically calls IdleHandler. | 540 // Timer that periodically calls IdleHandler. |
| 541 base::RepeatingTimer<RenderThreadImpl> idle_timer_; | 541 base::RepeatingTimer<RenderThreadImpl> idle_timer_; |
| 542 | 542 |
| 543 // The channel from the renderer process to the GPU process. | 543 // The channel from the renderer process to the GPU process. |
| 544 scoped_refptr<GpuChannelHost> gpu_channel_; | 544 scoped_refptr<GpuChannelHost> gpu_channel_; |
| 545 | 545 |
| 546 // Cache of variables that are needed on the compositor thread by | 546 // Cache of variables that are needed on the compositor thread by |
| 547 // GpuChannelHostFactory methods. | 547 // GpuChannelHostFactory methods. |
| 548 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 548 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 549 | 549 |
| 550 // The message loop of the renderer main thread. | 550 // The message loop of the renderer main thread. |
| 551 // This message loop should be destructed before the RenderThreadImpl | 551 // This message loop should be destructed before the RenderThreadImpl |
| 552 // shuts down Blink. | 552 // shuts down Blink. |
| 553 scoped_ptr<base::MessageLoop> main_message_loop_; | 553 scoped_ptr<base::MessageLoop> main_message_loop_; |
| 554 | 554 |
| 555 // A lazily initiated thread on which file operations are run. | 555 // A lazily initiated thread on which file operations are run. |
| 556 scoped_ptr<base::Thread> file_thread_; | 556 scoped_ptr<base::Thread> file_thread_; |
| 557 | 557 |
| 558 // May be null if overridden by ContentRendererClient. | 558 // May be null if overridden by ContentRendererClient. |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 647 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 648 }; | 648 }; |
| 649 | 649 |
| 650 #if defined(COMPILER_MSVC) | 650 #if defined(COMPILER_MSVC) |
| 651 #pragma warning(pop) | 651 #pragma warning(pop) |
| 652 #endif | 652 #endif |
| 653 | 653 |
| 654 } // namespace content | 654 } // namespace content |
| 655 | 655 |
| 656 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 656 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |