| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 | 479 |
| 480 mojom::StoragePartitionService* GetStoragePartitionService(); | 480 mojom::StoragePartitionService* GetStoragePartitionService(); |
| 481 | 481 |
| 482 // ChildMemoryCoordinatorDelegate implementation. | 482 // ChildMemoryCoordinatorDelegate implementation. |
| 483 void OnTrimMemoryImmediately() override; | 483 void OnTrimMemoryImmediately() override; |
| 484 | 484 |
| 485 protected: | 485 protected: |
| 486 RenderThreadImpl( | 486 RenderThreadImpl( |
| 487 const InProcessChildThreadParams& params, | 487 const InProcessChildThreadParams& params, |
| 488 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, | 488 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, |
| 489 scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 489 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 490 RenderThreadImpl( | 490 RenderThreadImpl( |
| 491 std::unique_ptr<base::MessageLoop> main_message_loop, | 491 std::unique_ptr<base::MessageLoop> main_message_loop, |
| 492 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); | 492 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); |
| 493 | 493 |
| 494 private: | 494 private: |
| 495 // IPC::Listener | 495 // IPC::Listener |
| 496 void OnChannelError() override; | 496 void OnChannelError() override; |
| 497 | 497 |
| 498 // ChildThread | 498 // ChildThread |
| 499 bool OnControlMessageReceived(const IPC::Message& msg) override; | 499 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 510 size_t size) override; | 510 size_t size) override; |
| 511 | 511 |
| 512 // Purges memory and suspends the renderer. | 512 // Purges memory and suspends the renderer. |
| 513 void SuspendRenderer(); | 513 void SuspendRenderer(); |
| 514 | 514 |
| 515 // base::MemoryCoordinatorClient implementation: | 515 // base::MemoryCoordinatorClient implementation: |
| 516 void OnMemoryStateChange(base::MemoryState state) override; | 516 void OnMemoryStateChange(base::MemoryState state) override; |
| 517 | 517 |
| 518 void ClearMemory(); | 518 void ClearMemory(); |
| 519 | 519 |
| 520 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 520 void Init( |
| 521 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 521 | 522 |
| 522 void InitializeCompositorThread(); | 523 void InitializeCompositorThread(); |
| 523 | 524 |
| 524 void InitializeWebKit( | 525 void InitializeWebKit( |
| 525 scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 526 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 526 | 527 |
| 527 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 528 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
| 528 void OnGetAccessibilityTree(); | 529 void OnGetAccessibilityTree(); |
| 529 | 530 |
| 530 // mojom::Renderer: | 531 // mojom::Renderer: |
| 531 void CreateView(mojom::CreateViewParamsPtr params) override; | 532 void CreateView(mojom::CreateViewParamsPtr params) override; |
| 532 void CreateFrame(mojom::CreateFrameParamsPtr params) override; | 533 void CreateFrame(mojom::CreateFrameParamsPtr params) override; |
| 533 void CreateFrameProxy(int32_t routing_id, | 534 void CreateFrameProxy(int32_t routing_id, |
| 534 int32_t render_view_routing_id, | 535 int32_t render_view_routing_id, |
| 535 int32_t opener_routing_id, | 536 int32_t opener_routing_id, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 769 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 769 }; | 770 }; |
| 770 | 771 |
| 771 #if defined(COMPILER_MSVC) | 772 #if defined(COMPILER_MSVC) |
| 772 #pragma warning(pop) | 773 #pragma warning(pop) |
| 773 #endif | 774 #endif |
| 774 | 775 |
| 775 } // namespace content | 776 } // namespace content |
| 776 | 777 |
| 777 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 778 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |