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

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

Issue 2590773002: Add a public interface for content::MemoryCoordinator (Closed)
Patch Set: rebase Created 4 years 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 | « content/public/browser/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/memory_coordinator.h
diff --git a/content/public/browser/memory_coordinator.h b/content/public/browser/memory_coordinator.h
new file mode 100644
index 0000000000000000000000000000000000000000..3b7b7494eaa1f7578e46c90962f97298c1966af4
--- /dev/null
+++ b/content/public/browser/memory_coordinator.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_H_
+#define CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_H_
+
+#include "base/memory/memory_coordinator_client.h"
+#include "base/process/process_handle.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+// The interface that represents the browser side of MemoryCoordinator.
+// MemoryCoordinator determines memory state of each process (both browser
+// and renderers) and dispatches state change notifications to its clients.
+// See comments on MemoryCoordinatorClient for details.
+class CONTENT_EXPORT MemoryCoordinator {
+ public:
+ virtual ~MemoryCoordinator() {}
+
+ static MemoryCoordinator* GetInstance();
+
+ // Returns the memory state of the given process handle.
+ virtual base::MemoryState GetStateForProcess(base::ProcessHandle handle) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_H_
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698