Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: content/renderer/render_thread_impl.h

Issue 2321313002: Move components/memory_coordinator -> content/ (Closed)
Patch Set: rebase etc Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/cancelable_callback.h" 15 #include "base/cancelable_callback.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/memory_pressure_listener.h" 17 #include "base/memory/memory_pressure_listener.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/metrics/user_metrics_action.h" 19 #include "base/metrics/user_metrics_action.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/strings/string16.h" 21 #include "base/strings/string16.h"
22 #include "base/threading/thread_checker.h" 22 #include "base/threading/thread_checker.h"
23 #include "base/timer/timer.h" 23 #include "base/timer/timer.h"
24 #include "build/build_config.h" 24 #include "build/build_config.h"
25 #include "components/memory_coordinator/child/child_memory_coordinator_impl.h"
26 #include "content/child/child_thread_impl.h" 25 #include "content/child/child_thread_impl.h"
26 #include "content/child/memory/child_memory_coordinator_impl.h"
27 #include "content/common/content_export.h" 27 #include "content/common/content_export.h"
28 #include "content/common/frame.mojom.h" 28 #include "content/common/frame.mojom.h"
29 #include "content/common/frame_replication_state.h" 29 #include "content/common/frame_replication_state.h"
30 #include "content/common/render_frame_message_filter.mojom.h" 30 #include "content/common/render_frame_message_filter.mojom.h"
31 #include "content/common/storage_partition_service.mojom.h" 31 #include "content/common/storage_partition_service.mojom.h"
32 #include "content/public/renderer/render_thread.h" 32 #include "content/public/renderer/render_thread.h"
33 #include "content/renderer/gpu/compositor_dependencies.h" 33 #include "content/renderer/gpu/compositor_dependencies.h"
34 #include "content/renderer/layout_test_dependencies.h" 34 #include "content/renderer/layout_test_dependencies.h"
35 #include "gpu/ipc/client/gpu_channel_host.h" 35 #include "gpu/ipc/client/gpu_channel_host.h"
36 #include "net/base/network_change_notifier.h" 36 #include "net/base/network_change_notifier.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // process (i.e., their corresponding WebContentsImpl). 143 // process (i.e., their corresponding WebContentsImpl).
144 // 144 //
145 // Most of the communication occurs in the form of IPC messages. They are 145 // Most of the communication occurs in the form of IPC messages. They are
146 // routed to the RenderThread according to the routing IDs of the messages. 146 // routed to the RenderThread according to the routing IDs of the messages.
147 // The routing IDs correspond to RenderView instances. 147 // The routing IDs correspond to RenderView instances.
148 class CONTENT_EXPORT RenderThreadImpl 148 class CONTENT_EXPORT RenderThreadImpl
149 : public RenderThread, 149 : public RenderThread,
150 public ChildThreadImpl, 150 public ChildThreadImpl,
151 public gpu::GpuChannelHostFactory, 151 public gpu::GpuChannelHostFactory,
152 public blink::scheduler::RendererScheduler::RAILModeObserver, 152 public blink::scheduler::RendererScheduler::RAILModeObserver,
153 public memory_coordinator::ChildMemoryCoordinatorDelegate, 153 public ChildMemoryCoordinatorDelegate,
154 NON_EXPORTED_BASE(public CompositorDependencies) { 154 NON_EXPORTED_BASE(public CompositorDependencies) {
155 public: 155 public:
156 static RenderThreadImpl* Create(const InProcessChildThreadParams& params); 156 static RenderThreadImpl* Create(const InProcessChildThreadParams& params);
157 static RenderThreadImpl* Create( 157 static RenderThreadImpl* Create(
158 std::unique_ptr<base::MessageLoop> main_message_loop, 158 std::unique_ptr<base::MessageLoop> main_message_loop,
159 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler); 159 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler);
160 static RenderThreadImpl* current(); 160 static RenderThreadImpl* current();
161 161
162 ~RenderThreadImpl() override; 162 ~RenderThreadImpl() override;
163 void Shutdown() override; 163 void Shutdown() override;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 void AddEmbeddedWorkerRoute(int32_t routing_id, IPC::Listener* listener); 444 void AddEmbeddedWorkerRoute(int32_t routing_id, IPC::Listener* listener);
445 void RemoveEmbeddedWorkerRoute(int32_t routing_id); 445 void RemoveEmbeddedWorkerRoute(int32_t routing_id);
446 446
447 void RegisterPendingFrameCreate(int routing_id, 447 void RegisterPendingFrameCreate(int routing_id,
448 mojom::FrameRequest frame, 448 mojom::FrameRequest frame,
449 mojom::FrameHostPtr host); 449 mojom::FrameHostPtr host);
450 450
451 mojom::StoragePartitionService* GetStoragePartitionService(); 451 mojom::StoragePartitionService* GetStoragePartitionService();
452 452
453 // memory_coordinator::ChildMemoryCoordinatorDelegate implementation. 453 // ChildMemoryCoordinatorDelegate implementation.
454 void OnTrimMemoryImmediately() override; 454 void OnTrimMemoryImmediately() override;
455 455
456 protected: 456 protected:
457 RenderThreadImpl( 457 RenderThreadImpl(
458 const InProcessChildThreadParams& params, 458 const InProcessChildThreadParams& params,
459 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, 459 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler,
460 scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); 460 scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
461 RenderThreadImpl( 461 RenderThreadImpl(
462 std::unique_ptr<base::MessageLoop> main_message_loop, 462 std::unique_ptr<base::MessageLoop> main_message_loop,
463 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); 463 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 645
646 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; 646 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;
647 647
648 std::unique_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_; 648 std::unique_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_;
649 649
650 HistogramCustomizer histogram_customizer_; 650 HistogramCustomizer histogram_customizer_;
651 651
652 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; 652 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
653 653
654 std::unique_ptr<MemoryObserver> memory_observer_; 654 std::unique_ptr<MemoryObserver> memory_observer_;
655 std::unique_ptr<memory_coordinator::ChildMemoryCoordinatorImpl> 655 std::unique_ptr<ChildMemoryCoordinatorImpl> memory_coordinator_;
656 memory_coordinator_;
657 656
658 #if defined(USE_AURA) 657 #if defined(USE_AURA)
659 std::unique_ptr<ui::GpuService> gpu_service_; 658 std::unique_ptr<ui::GpuService> gpu_service_;
660 #endif 659 #endif
661 660
662 scoped_refptr<base::SingleThreadTaskRunner> 661 scoped_refptr<base::SingleThreadTaskRunner>
663 main_thread_compositor_task_runner_; 662 main_thread_compositor_task_runner_;
664 663
665 // Compositor settings. 664 // Compositor settings.
666 bool is_gpu_rasterization_enabled_; 665 bool is_gpu_rasterization_enabled_;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 714 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
716 }; 715 };
717 716
718 #if defined(COMPILER_MSVC) 717 #if defined(COMPILER_MSVC)
719 #pragma warning(pop) 718 #pragma warning(pop)
720 #endif 719 #endif
721 720
722 } // namespace content 721 } // namespace content
723 722
724 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 723 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698