Index: chrome/browser/memory/chrome_memory_coordinator_delegate.cc |
diff --git a/chrome/browser/memory/chrome_memory_coordinator_delegate.cc b/chrome/browser/memory/chrome_memory_coordinator_delegate.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..672b203569a5a65f9071cc5d4eb783f726a64b80 |
--- /dev/null |
+++ b/chrome/browser/memory/chrome_memory_coordinator_delegate.cc |
@@ -0,0 +1,34 @@ |
+// 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. |
+ |
+#include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" |
+ |
+#include "base/memory/ptr_util.h" |
+#include "chrome/browser/browser_process.h" |
+#include "chrome/browser/memory/tab_manager.h" |
+ |
+namespace memory { |
+ |
+// static |
+std::unique_ptr<content::MemoryCoordinatorDelegate> |
+ChromeMemoryCoordinatorDelegate::Create() { |
+ return base::WrapUnique(new ChromeMemoryCoordinatorDelegate); |
+} |
+ |
+ChromeMemoryCoordinatorDelegate::ChromeMemoryCoordinatorDelegate() {} |
+ |
+ChromeMemoryCoordinatorDelegate::~ChromeMemoryCoordinatorDelegate() {} |
+ |
+bool ChromeMemoryCoordinatorDelegate::CanSuspendBackgroundedRenderer( |
+ int render_process_id) { |
+#if defined(OS_ANDROID) |
+ // TODO(bashi): Implement |
+ return true; |
+#else |
+ return g_browser_process->GetTabManager()->CanSuspendBackgroundedRenderer( |
+ render_process_id); |
+#endif |
+} |
+ |
+} // namespace memory |