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

Unified Diff: chrome/browser/ui/tab_contents/core_tab_helper.h

Issue 17571018: Reland fast tab closure behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, 2nd attempt to land. Created 7 years, 6 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/ui/tab_contents/core_tab_helper.h
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.h b/chrome/browser/ui/tab_contents/core_tab_helper.h
index 69aafd23fd4383d60ec4642d3d749c1b72d94e20..c8e67828fdc6e825245010f60613ad3ffc8e09d2 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.h
@@ -31,6 +31,14 @@ class CoreTabHelper : public content::WebContentsObserver,
// cancels a window close via another tab's beforeunload dialog.
void OnCloseCanceled();
+ // Set the time during close when unload is started. Normally, this is set
+ // after the beforeunload dialog. However, for a window close, it is set
+ // after all the beforeunload dialogs have finished.
+ void OnUnloadStarted();
+
+ // Set the time during close when the tab is no longer visible.
+ void OnUnloadDetachedStarted();
+
CoreTabHelperDelegate* delegate() const { return delegate_; }
void set_delegate(CoreTabHelperDelegate* d) { delegate_ = d; }
@@ -64,6 +72,9 @@ class CoreTabHelper : public content::WebContentsObserver,
// The time when onbeforeunload ended.
base::TimeTicks before_unload_end_time_;
+ // The time when the tab was removed from view during close.
+ base::TimeTicks unload_detached_start_time_;
+
DISALLOW_COPY_AND_ASSIGN(CoreTabHelper);
};

Powered by Google App Engine
This is Rietveld 408576698