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

Unified Diff: chrome/browser/memory/chrome_memory_coordinator_delegate.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
Index: chrome/browser/memory/chrome_memory_coordinator_delegate.h
diff --git a/chrome/browser/memory/chrome_memory_coordinator_delegate.h b/chrome/browser/memory/chrome_memory_coordinator_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..7efe7088f73c574a2718c3b7d2425c170ede2602
--- /dev/null
+++ b/chrome/browser/memory/chrome_memory_coordinator_delegate.h
@@ -0,0 +1,32 @@
+// 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 CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_
+#define CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_
+
+#include "base/memory/weak_ptr.h"
+#include "content/public/browser/memory_coordinator_delegate.h"
+
+namespace memory {
+
+// A MemoryCoordinatorDelegate which uses TabManager internally.
+class ChromeMemoryCoordinatorDelegate
+ : public content::MemoryCoordinatorDelegate {
+ public:
+ static std::unique_ptr<content::MemoryCoordinatorDelegate> Create();
+
+ ~ChromeMemoryCoordinatorDelegate() override;
+
+ // MemoryCoordinatorDelegate implementation.
+ bool CanSuspendBackgroundedRenderer(int render_process_id) override;
+
+ private:
+ ChromeMemoryCoordinatorDelegate();
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeMemoryCoordinatorDelegate);
+};
+
+} // namespace memory
+
+#endif // CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/memory/chrome_memory_coordinator_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698