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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 2426733004: Bug fix: Use the last hidden time for purge + suspend (Closed)
Patch Set: (rebase) 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 | « chrome/browser/memory/tab_stats.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 3afb1aab039d99d206c9b33af0d666dbd9d6c669..000a9316e71c54b5e5392441ff6a4041ccc64586 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -327,6 +327,7 @@ class CONTENT_EXPORT WebContentsImpl
void NotifyNavigationStateChanged(InvalidateTypes changed_flags) override;
base::TimeTicks GetLastActiveTime() const override;
void SetLastActiveTime(base::TimeTicks last_active_time) override;
+ base::TimeTicks GetLastHiddenTime() const override;
void WasShown() override;
void WasHidden() override;
bool NeedToFireBeforeUnload() override;
@@ -1270,6 +1271,10 @@ class CONTENT_EXPORT WebContentsImpl
// the WebContents creation time.
base::TimeTicks last_active_time_;
+ // The time that this WebContents was last made hidden. The initial value is
+ // zero.
+ base::TimeTicks last_hidden_time_;
+
// See description above setter.
bool closed_by_user_gesture_;
« no previous file with comments | « chrome/browser/memory/tab_stats.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698