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

Side by Side Diff: chrome/browser/memory/chrome_memory_coordinator_delegate.cc

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 unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « chrome/browser/memory/chrome_memory_coordinator_delegate.h ('k') | chrome/browser/memory/tab_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698