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

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

Issue 2399293002: Add MemoryCoordinatorDelegate (Closed)
Patch Set: Add a separate delegate class 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 | « chrome/browser/memory/tab_manager_browsertest.cc ('k') | content/browser/memory/memory_coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..65f44781c87dee2a2154a75b086f8265de8fe588 100644
--- a/content/browser/memory/memory_coordinator.h
+++ b/content/browser/memory/memory_coordinator.h
@@ -10,6 +10,7 @@
#include "base/process/process_handle.h"
#include "content/common/content_export.h"
#include "content/common/memory_coordinator.mojom.h"
+#include "content/public/browser/memory_coordinator_delegate.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace content {
@@ -59,6 +60,9 @@ class CONTENT_EXPORT MemoryCoordinator {
// for testing.
void OnConnectionError(int render_process_id);
+ // Returns true when a given renderer can be suspended.
+ bool CanSuspendRenderer(int render_process_id);
+
private:
friend struct base::DefaultSingletonTraits<MemoryCoordinator>;
@@ -86,6 +90,8 @@ class CONTENT_EXPORT MemoryCoordinator {
// disconnected.
ChildInfoMap children_;
+ std::unique_ptr<MemoryCoordinatorDelegate> delegate_;
+
DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator);
};
« no previous file with comments | « chrome/browser/memory/tab_manager_browsertest.cc ('k') | content/browser/memory/memory_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698