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

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

Issue 138913021: Avoid discarding freshly created background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (last_selected) Created 6 years, 10 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/devtools/devtools_target_impl.cc ('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 37679f1881902e5a63b400203f34ba0f9b2b9c4c..c9502666d05d830dbd31935e93060b1fe6e395db 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -233,7 +233,7 @@ class CONTENT_EXPORT WebContentsImpl
virtual base::TerminationStatus GetCrashedStatus() const OVERRIDE;
virtual bool IsBeingDestroyed() const OVERRIDE;
virtual void NotifyNavigationStateChanged(unsigned changed_flags) OVERRIDE;
- virtual base::TimeTicks GetLastSelectedTime() const OVERRIDE;
+ virtual base::TimeTicks GetLastActiveTime() const OVERRIDE;
virtual void WasShown() OVERRIDE;
virtual void WasHidden() OVERRIDE;
virtual bool NeedToFireBeforeUnload() OVERRIDE;
@@ -626,6 +626,7 @@ class CONTENT_EXPORT WebContentsImpl
CrossSiteCantPreemptAfterUnload);
FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, PendingContents);
FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FrameTreeShape);
+ FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, GetLastActiveTime);
FRIEND_TEST_ALL_PREFIXES(FormStructureBrowserTest, HTMLFiles);
FRIEND_TEST_ALL_PREFIXES(NavigationControllerTest, HistoryNavigate);
FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest, PageDoesBackAndReload);
@@ -988,8 +989,9 @@ class CONTENT_EXPORT WebContentsImpl
// Settings that get passed to the renderer process.
RendererPreferences renderer_preferences_;
- // The time that this tab was last selected.
- base::TimeTicks last_selected_time_;
+ // The time that this WebContents was last made active. The initial value is
+ // the WebContents creation time.
+ base::TimeTicks last_active_time_;
// See description above setter.
bool closed_by_user_gesture_;
« no previous file with comments | « chrome/browser/devtools/devtools_target_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698