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

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

Issue 2399293002: Add MemoryCoordinatorDelegate (Closed)
Patch Set: Add workaround for tests 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 | « 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_delegate.h
diff --git a/content/public/browser/memory_coordinator_delegate.h b/content/public/browser/memory_coordinator_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..695e52f0e29bd8f173407a3e644f1254db32cfed
--- /dev/null
+++ b/content/public/browser/memory_coordinator_delegate.h
@@ -0,0 +1,28 @@
+// 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_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_
+
+#include "base/memory/weak_ptr.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+// A delegate class which is used by the memory coordinator.
+class CONTENT_EXPORT MemoryCoordinatorDelegate {
+ public:
+ // Sets an instance of MemoryCoordinatorDelegate.
+ static void Set(const base::WeakPtr<MemoryCoordinatorDelegate>& delegate);
jam 2016/10/11 15:50:00 nit: the general pattern used is for ContentBrower
bashi 2016/10/13 01:40:56 Done. I was looking for something like ContentBrow
+
+ // Returns true when a given backgrounded renderer process can be suspended.
+ virtual bool CanSuspendBackgroundedRenderer(int render_process_id) = 0;
+
+ protected:
+ virtual ~MemoryCoordinatorDelegate() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_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