Index: chrome/browser/memory/tab_manager.h |
diff --git a/chrome/browser/memory/tab_manager.h b/chrome/browser/memory/tab_manager.h |
index cd5c3480417bf76976c8a3849ae4d0e5fe6c5057..fb1dba0d786a453639bc4ed8d9581dac46209634 100644 |
--- a/chrome/browser/memory/tab_manager.h |
+++ b/chrome/browser/memory/tab_manager.h |
@@ -128,6 +128,12 @@ class TabManager : public TabStripModelObserver { |
void AddObserver(TabManagerObserver* observer); |
void RemoveObserver(TabManagerObserver* observer); |
+ // Returns true if the tab is auto discardable by auto discarding feature. |
Georges Khalil
2016/07/22 15:07:57
nit: reword the comment
Returns the auto discarda
Anderson Silva
2016/07/22 15:34:51
Done.
|
+ bool IsTabAutoDiscardable(content::WebContents* contents) const; |
+ |
+ // Sets/clears the AutoDiscardable state of the tab. |
+ void SetTabAutoDiscardableState(content::WebContents* contents, bool state); |
Georges Khalil
2016/07/22 15:07:57
nit: s/AutoDiscardable/auto discardable
Anderson Silva
2016/07/22 15:34:51
Done.
|
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(TabManagerTest, CanOnlyDiscardOnce); |
FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ChildProcessNotifications); |
@@ -151,6 +157,12 @@ class TabManager : public TabStripModelObserver { |
void OnDiscardedStateChange(content::WebContents* contents, |
bool is_discarded); |
+ // Called by WebContentsData whenever the AutoDiscardable state of a |
+ // WebContents |
Georges Khalil
2016/07/22 15:07:57
nit: line ending.
nit: s/AutoDiscardable/auto disc
Anderson Silva
2016/07/22 15:34:51
Done.
|
+ // changes, so that observers can be informed. |
+ void OnAutoDiscardableStateChange(content::WebContents* contents, |
+ bool is_auto_discardable); |
+ |
// The time that a renderer is given to react to a memory pressure |
// notification before another renderer is also notified. This prevents all |
// renderers from receiving and acting upon notifications simultaneously, |