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

Unified Diff: content/browser/memory/memory_coordinator.h

Issue 2413643002: Add MemoryCoordinator::SetClientMemoryState and GetClientMemoryState (Closed)
Patch Set: 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
Index: content/browser/memory/memory_coordinator.h
diff --git a/content/browser/memory/memory_coordinator.h b/content/browser/memory/memory_coordinator.h
index f674ef5b48ce950e5c442c24e73aef850940251d..20a4e0f3d778a86d3309bb9c5b9d31e0b941357e 100644
--- a/content/browser/memory/memory_coordinator.h
+++ b/content/browser/memory/memory_coordinator.h
@@ -42,10 +42,16 @@ class CONTENT_EXPORT MemoryCoordinator {
bool SetMemoryState(
int render_process_id, mojom::MemoryState memory_state);
+ // Dispatches a memory state change to registered MemoryCoordinatorClients.
+ void SetClientMemoryState(base::MemoryState memory_state);
+
// Returns the memory state of the specified render process. Returns UNKNOWN
// if the process is not tracked by this coordinator.
mojom::MemoryState GetMemoryState(int render_process_id) const;
+ // Returns the memory state of registered MemoryCoordinatorClients.
+ base::MemoryState GetClientMemoryState() const;
+
protected:
// Constructor. Protected as this is a singleton, but accessible for
// unittests.
@@ -86,6 +92,8 @@ class CONTENT_EXPORT MemoryCoordinator {
// disconnected.
ChildInfoMap children_;
+ base::MemoryState client_memory_state_;
+
DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator);
};
« no previous file with comments | « no previous file | content/browser/memory/memory_coordinator.cc » ('j') | content/browser/memory/memory_coordinator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698