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

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

Issue 2167843004: Discardable property support on TabManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new discardable functions on TabManager Created 4 years, 5 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
Index: chrome/browser/memory/tab_manager.cc
diff --git a/chrome/browser/memory/tab_manager.cc b/chrome/browser/memory/tab_manager.cc
index 6fa39ad66f4abcae4e9a2b8fd9c2677945db888f..b95860e7d9e63d1acca1bbb5c7e5c06cdd72c66c 100644
--- a/chrome/browser/memory/tab_manager.cc
+++ b/chrome/browser/memory/tab_manager.cc
@@ -906,4 +906,19 @@ void TabManager::OnDiscardedStateChange(content::WebContents* contents,
OnDiscardedStateChange(contents, is_discarded));
}
+void TabManager::OnDiscardableStateChange(content::WebContents* contents,
+ bool is_discardable) {
+ FOR_EACH_OBSERVER(TabManagerObserver, observers_,
+ OnDiscardableStateChange(contents, is_discardable));
+}
+
+void TabManager::SetDiscardableState(content::WebContents* contents,
+ bool state) {
+ GetWebContentsData(contents)->SetDiscardableState(state);
+}
+
+bool TabManager::IsDiscardable(content::WebContents* contents) {
+ return GetWebContentsData(contents)->IsDiscardable();
+}
+
} // namespace memory

Powered by Google App Engine
This is Rietveld 408576698