| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" | 5 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/memory/tab_manager.h" | 9 #include "chrome/browser/resource_coordinator/tab_manager.h" |
| 10 | 10 |
| 11 namespace memory { | 11 namespace memory { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 std::unique_ptr<content::MemoryCoordinatorDelegate> | 14 std::unique_ptr<content::MemoryCoordinatorDelegate> |
| 15 ChromeMemoryCoordinatorDelegate::Create() { | 15 ChromeMemoryCoordinatorDelegate::Create() { |
| 16 return base::WrapUnique(new ChromeMemoryCoordinatorDelegate); | 16 return base::WrapUnique(new ChromeMemoryCoordinatorDelegate); |
| 17 } | 17 } |
| 18 | 18 |
| 19 ChromeMemoryCoordinatorDelegate::ChromeMemoryCoordinatorDelegate() {} | 19 ChromeMemoryCoordinatorDelegate::ChromeMemoryCoordinatorDelegate() {} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 | 33 |
| 34 void ChromeMemoryCoordinatorDelegate::DiscardTab() { | 34 void ChromeMemoryCoordinatorDelegate::DiscardTab() { |
| 35 #if !defined(OS_ANDROID) | 35 #if !defined(OS_ANDROID) |
| 36 if (g_browser_process->GetTabManager()) | 36 if (g_browser_process->GetTabManager()) |
| 37 g_browser_process->GetTabManager()->DiscardTab(); | 37 g_browser_process->GetTabManager()->DiscardTab(); |
| 38 #endif | 38 #endif |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace memory | 41 } // namespace memory |
| OLD | NEW |