| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 void RegisterPendingFrameCreate(int routing_id, | 475 void RegisterPendingFrameCreate(int routing_id, |
| 476 mojom::FrameRequest frame, | 476 mojom::FrameRequest frame, |
| 477 mojom::FrameHostPtr host); | 477 mojom::FrameHostPtr host); |
| 478 | 478 |
| 479 mojom::StoragePartitionService* GetStoragePartitionService(); | 479 mojom::StoragePartitionService* GetStoragePartitionService(); |
| 480 | 480 |
| 481 // ChildMemoryCoordinatorDelegate implementation. | 481 // ChildMemoryCoordinatorDelegate implementation. |
| 482 void OnTrimMemoryImmediately() override; | 482 void OnTrimMemoryImmediately() override; |
| 483 | 483 |
| 484 struct RendererMemoryMetrics { |
| 485 size_t partition_alloc_kb; |
| 486 size_t blink_gc_kb; |
| 487 size_t malloc_mb; |
| 488 size_t discardable_kb; |
| 489 size_t v8_main_thread_isolate_mb; |
| 490 size_t total_allocated_mb; |
| 491 size_t non_discardable_total_allocated_mb; |
| 492 size_t total_allocated_per_render_view_mb; |
| 493 }; |
| 494 void GetRendererMemoryMetrics( |
| 495 RendererMemoryMetrics* memory_metrics) const; |
| 496 |
| 484 protected: | 497 protected: |
| 485 RenderThreadImpl( | 498 RenderThreadImpl( |
| 486 const InProcessChildThreadParams& params, | 499 const InProcessChildThreadParams& params, |
| 487 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, | 500 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, |
| 488 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 501 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 489 RenderThreadImpl( | 502 RenderThreadImpl( |
| 490 std::unique_ptr<base::MessageLoop> main_message_loop, | 503 std::unique_ptr<base::MessageLoop> main_message_loop, |
| 491 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); | 504 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); |
| 492 | 505 |
| 493 private: | 506 private: |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 772 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 760 }; | 773 }; |
| 761 | 774 |
| 762 #if defined(COMPILER_MSVC) | 775 #if defined(COMPILER_MSVC) |
| 763 #pragma warning(pop) | 776 #pragma warning(pop) |
| 764 #endif | 777 #endif |
| 765 | 778 |
| 766 } // namespace content | 779 } // namespace content |
| 767 | 780 |
| 768 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 781 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |