| 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" | |
| 36 #include "content/common/render_frame_message_filter.mojom.h" | 35 #include "content/common/render_frame_message_filter.mojom.h" |
| 37 #include "content/common/render_message_filter.mojom.h" | 36 #include "content/common/render_message_filter.mojom.h" |
| 38 #include "content/common/renderer.mojom.h" | 37 #include "content/common/renderer.mojom.h" |
| 39 #include "content/common/storage_partition_service.mojom.h" | 38 #include "content/common/storage_partition_service.mojom.h" |
| 40 #include "content/public/renderer/render_thread.h" | 39 #include "content/public/renderer/render_thread.h" |
| 41 #include "content/renderer/gpu/compositor_dependencies.h" | 40 #include "content/renderer/gpu/compositor_dependencies.h" |
| 42 #include "content/renderer/layout_test_dependencies.h" | 41 #include "content/renderer/layout_test_dependencies.h" |
| 43 #include "gpu/ipc/client/gpu_channel_host.h" | 42 #include "gpu/ipc/client/gpu_channel_host.h" |
| 44 #include "media/media_features.h" | 43 #include "media/media_features.h" |
| 45 #include "mojo/public/cpp/bindings/associated_binding.h" | 44 #include "mojo/public/cpp/bindings/associated_binding.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 size_t total_allocated_mb; | 495 size_t total_allocated_mb; |
| 497 size_t non_discardable_total_allocated_mb; | 496 size_t non_discardable_total_allocated_mb; |
| 498 size_t total_allocated_per_render_view_mb; | 497 size_t total_allocated_per_render_view_mb; |
| 499 }; | 498 }; |
| 500 bool GetRendererMemoryMetrics(RendererMemoryMetrics* memory_metrics) const; | 499 bool GetRendererMemoryMetrics(RendererMemoryMetrics* memory_metrics) const; |
| 501 | 500 |
| 502 bool NeedsToRecordFirstActivePaint() const { | 501 bool NeedsToRecordFirstActivePaint() const { |
| 503 return needs_to_record_first_active_paint_; | 502 return needs_to_record_first_active_paint_; |
| 504 } | 503 } |
| 505 | 504 |
| 506 mojom::FrameSinkProvider* GetFrameSinkProvider() { | |
| 507 return frame_sink_provider_.get(); | |
| 508 } | |
| 509 | |
| 510 protected: | 505 protected: |
| 511 RenderThreadImpl( | 506 RenderThreadImpl( |
| 512 const InProcessChildThreadParams& params, | 507 const InProcessChildThreadParams& params, |
| 513 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, | 508 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, |
| 514 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); | 509 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); |
| 515 RenderThreadImpl( | 510 RenderThreadImpl( |
| 516 std::unique_ptr<base::MessageLoop> main_message_loop, | 511 std::unique_ptr<base::MessageLoop> main_message_loop, |
| 517 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); | 512 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); |
| 518 | 513 |
| 519 private: | 514 private: |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 mojom::RenderMessageFilterAssociatedPtr render_message_filter_; | 776 mojom::RenderMessageFilterAssociatedPtr render_message_filter_; |
| 782 | 777 |
| 783 RendererMemoryMetrics purge_and_suspend_memory_metrics_; | 778 RendererMemoryMetrics purge_and_suspend_memory_metrics_; |
| 784 base::CancelableClosure record_purge_suspend_growth_metric_closure_; | 779 base::CancelableClosure record_purge_suspend_growth_metric_closure_; |
| 785 bool needs_to_record_first_active_paint_; | 780 bool needs_to_record_first_active_paint_; |
| 786 | 781 |
| 787 int32_t client_id_; | 782 int32_t client_id_; |
| 788 | 783 |
| 789 variations::ChildProcessFieldTrialSyncer field_trial_syncer_; | 784 variations::ChildProcessFieldTrialSyncer field_trial_syncer_; |
| 790 | 785 |
| 791 mojom::FrameSinkProviderPtr frame_sink_provider_; | |
| 792 | |
| 793 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 786 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 794 }; | 787 }; |
| 795 | 788 |
| 796 #if defined(COMPILER_MSVC) | 789 #if defined(COMPILER_MSVC) |
| 797 #pragma warning(pop) | 790 #pragma warning(pop) |
| 798 #endif | 791 #endif |
| 799 | 792 |
| 800 } // namespace content | 793 } // namespace content |
| 801 | 794 |
| 802 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 795 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |