| 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 14 matching lines...) Expand all Loading... |
| 25 #include "base/threading/thread_checker.h" | 25 #include "base/threading/thread_checker.h" |
| 26 #include "base/timer/timer.h" | 26 #include "base/timer/timer.h" |
| 27 #include "build/build_config.h" | 27 #include "build/build_config.h" |
| 28 #include "components/variations/child_process_field_trial_syncer.h" | 28 #include "components/variations/child_process_field_trial_syncer.h" |
| 29 #include "content/child/child_thread_impl.h" | 29 #include "content/child/child_thread_impl.h" |
| 30 #include "content/child/memory/child_memory_coordinator_impl.h" | 30 #include "content/child/memory/child_memory_coordinator_impl.h" |
| 31 #include "content/common/associated_interface_registry_impl.h" | 31 #include "content/common/associated_interface_registry_impl.h" |
| 32 #include "content/common/content_export.h" | 32 #include "content/common/content_export.h" |
| 33 #include "content/common/frame.mojom.h" | 33 #include "content/common/frame.mojom.h" |
| 34 #include "content/common/frame_replication_state.h" | 34 #include "content/common/frame_replication_state.h" |
| 35 #include "content/common/frame_sink_provider.mojom.h" |
| 35 #include "content/common/render_frame_message_filter.mojom.h" | 36 #include "content/common/render_frame_message_filter.mojom.h" |
| 36 #include "content/common/render_message_filter.mojom.h" | 37 #include "content/common/render_message_filter.mojom.h" |
| 37 #include "content/common/renderer.mojom.h" | 38 #include "content/common/renderer.mojom.h" |
| 38 #include "content/common/storage_partition_service.mojom.h" | 39 #include "content/common/storage_partition_service.mojom.h" |
| 39 #include "content/public/renderer/render_thread.h" | 40 #include "content/public/renderer/render_thread.h" |
| 40 #include "content/renderer/gpu/compositor_dependencies.h" | 41 #include "content/renderer/gpu/compositor_dependencies.h" |
| 41 #include "content/renderer/layout_test_dependencies.h" | 42 #include "content/renderer/layout_test_dependencies.h" |
| 42 #include "gpu/ipc/client/gpu_channel_host.h" | 43 #include "gpu/ipc/client/gpu_channel_host.h" |
| 43 #include "media/media_features.h" | 44 #include "media/media_features.h" |
| 44 #include "mojo/public/cpp/bindings/associated_binding.h" | 45 #include "mojo/public/cpp/bindings/associated_binding.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 size_t total_allocated_mb; | 498 size_t total_allocated_mb; |
| 498 size_t non_discardable_total_allocated_mb; | 499 size_t non_discardable_total_allocated_mb; |
| 499 size_t total_allocated_per_render_view_mb; | 500 size_t total_allocated_per_render_view_mb; |
| 500 }; | 501 }; |
| 501 bool GetRendererMemoryMetrics(RendererMemoryMetrics* memory_metrics) const; | 502 bool GetRendererMemoryMetrics(RendererMemoryMetrics* memory_metrics) const; |
| 502 | 503 |
| 503 bool NeedsToRecordFirstActivePaint() const { | 504 bool NeedsToRecordFirstActivePaint() const { |
| 504 return needs_to_record_first_active_paint_; | 505 return needs_to_record_first_active_paint_; |
| 505 } | 506 } |
| 506 | 507 |
| 508 mojom::FrameSinkProvider* GetFrameSinkProvider() { |
| 509 return frame_sink_provider_.get(); |
| 510 } |
| 511 |
| 507 protected: | 512 protected: |
| 508 RenderThreadImpl( | 513 RenderThreadImpl( |
| 509 const InProcessChildThreadParams& params, | 514 const InProcessChildThreadParams& params, |
| 510 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, | 515 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, |
| 511 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 516 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 512 RenderThreadImpl( | 517 RenderThreadImpl( |
| 513 std::unique_ptr<base::MessageLoop> main_message_loop, | 518 std::unique_ptr<base::MessageLoop> main_message_loop, |
| 514 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); | 519 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); |
| 515 | 520 |
| 516 private: | 521 private: |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 784 |
| 780 base::CancelableClosure record_purge_suspend_metric_closure_; | 785 base::CancelableClosure record_purge_suspend_metric_closure_; |
| 781 RendererMemoryMetrics purge_and_suspend_memory_metrics_; | 786 RendererMemoryMetrics purge_and_suspend_memory_metrics_; |
| 782 base::CancelableClosure record_purge_suspend_growth_metric_closure_; | 787 base::CancelableClosure record_purge_suspend_growth_metric_closure_; |
| 783 bool needs_to_record_first_active_paint_; | 788 bool needs_to_record_first_active_paint_; |
| 784 | 789 |
| 785 int32_t client_id_; | 790 int32_t client_id_; |
| 786 | 791 |
| 787 variations::ChildProcessFieldTrialSyncer field_trial_syncer_; | 792 variations::ChildProcessFieldTrialSyncer field_trial_syncer_; |
| 788 | 793 |
| 794 mojom::FrameSinkProviderPtr frame_sink_provider_; |
| 795 |
| 789 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 796 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 790 }; | 797 }; |
| 791 | 798 |
| 792 #if defined(COMPILER_MSVC) | 799 #if defined(COMPILER_MSVC) |
| 793 #pragma warning(pop) | 800 #pragma warning(pop) |
| 794 #endif | 801 #endif |
| 795 | 802 |
| 796 } // namespace content | 803 } // namespace content |
| 797 | 804 |
| 798 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 805 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |