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

Unified Diff: chrome/browser/memory/tab_manager.h

Issue 2399293002: Add MemoryCoordinatorDelegate (Closed)
Patch Set: comments addressed 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
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager.cc » ('j') | chrome/browser/memory/tab_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory/tab_manager.h
diff --git a/chrome/browser/memory/tab_manager.h b/chrome/browser/memory/tab_manager.h
index e681782791bfda6063401bb0f54e6c55ecca55f1..ff091b88aaf89f6a8fd0bd29c7ac5772100fbbcb 100644
--- a/chrome/browser/memory/tab_manager.h
+++ b/chrome/browser/memory/tab_manager.h
@@ -28,6 +28,7 @@
#include "chrome/browser/memory/tab_stats.h"
#include "chrome/browser/ui/browser_tab_strip_tracker.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
+#include "content/public/browser/memory_coordinator_delegate.h"
class BrowserList;
class GURL;
@@ -65,7 +66,8 @@ class TabManagerDelegate;
// Note that the browser tests are only active for platforms that use
// TabManager (CrOS only for now) and need to be adjusted accordingly if
// support for new platforms is added.
-class TabManager : public TabStripModelObserver {
+class TabManager : public TabStripModelObserver,
+ public content::MemoryCoordinatorDelegate {
public:
// Needs to be public for DEFINE_WEB_CONTENTS_USER_DATA_KEY.
class WebContentsData;
@@ -147,6 +149,9 @@ class TabManager : public TabStripModelObserver {
// Sets/clears the auto-discardable state of the tab.
void SetTabAutoDiscardableState(content::WebContents* contents, bool state);
+ // MemoryCoordinatorDelegate implementation.
+ bool CanSuspendRenderer(int render_process_id) override;
+
// Returns true if |first| is considered less desirable to be killed than
// |second|.
static bool CompareTabStats(const TabStats& first, const TabStats& second);
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager.cc » ('j') | chrome/browser/memory/tab_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698