OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" |
| 6 |
| 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/memory/tab_manager.h" |
| 10 |
| 11 namespace memory { |
| 12 |
| 13 // static |
| 14 std::unique_ptr<content::MemoryCoordinatorDelegate> |
| 15 ChromeMemoryCoordinatorDelegate::Create() { |
| 16 return base::WrapUnique(new ChromeMemoryCoordinatorDelegate); |
| 17 } |
| 18 |
| 19 ChromeMemoryCoordinatorDelegate::ChromeMemoryCoordinatorDelegate() {} |
| 20 |
| 21 ChromeMemoryCoordinatorDelegate::~ChromeMemoryCoordinatorDelegate() {} |
| 22 |
| 23 bool ChromeMemoryCoordinatorDelegate::CanSuspendBackgroundedRenderer( |
| 24 int render_process_id) { |
| 25 #if defined(OS_ANDROID) |
| 26 // TODO(bashi): Implement |
| 27 return true; |
| 28 #else |
| 29 return g_browser_process->GetTabManager()->CanSuspendBackgroundedRenderer( |
| 30 render_process_id); |
| 31 #endif |
| 32 } |
| 33 |
| 34 } // namespace memory |
OLD | NEW |