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

Unified Diff: content/renderer/render_thread_impl.h

Issue 2402643002: Make RenderThreadImpl a client of memory coordinator (Closed)
Patch Set: Address on haraken's review Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index a5eba9781cef3a369d13b00a2e65ff944d42bdeb..2628ca6e1668627d16d2408500d2c81647c260f4 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -14,6 +14,7 @@
#include "base/cancelable_callback.h"
#include "base/macros.h"
+#include "base/memory/memory_coordinator_client.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/user_metrics_action.h"
@@ -155,6 +156,7 @@ class CONTENT_EXPORT RenderThreadImpl
public gpu::GpuChannelHostFactory,
public blink::scheduler::RendererScheduler::RAILModeObserver,
public ChildMemoryCoordinatorDelegate,
+ public base::MemoryCoordinatorClient,
NON_EXPORTED_BASE(public mojom::Renderer),
// TODO(blundell): Separate this impl out into Blink.
NON_EXPORTED_BASE(public device::mojom::TimeZoneMonitorClient),
@@ -494,6 +496,11 @@ class CONTENT_EXPORT RenderThreadImpl
std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
size_t size) override;
+ // base::MemoryCoordinatorClient implementation:
+ void OnMemoryStateChange(base::MemoryState state) override;
+
+ void ClearMemory();
+
void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
void InitializeCompositorThread();
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698