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

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

Issue 17382005: Unbreak tabs.onRemove extension API in face of fast tab closure Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't modify content 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 e5a37dda8e194f58fdda85e7c7ae438791c5c1a9..0fde2e45a3e11a9a24fb42506f26c0647493f127 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.h
@@ -23,6 +23,10 @@ class CoreTabHelper : public content::WebContentsObserver,
// Returns a human-readable description the tab's loading state.
string16 GetStatusText() const;
+ // True if view is in the process of being detached from it's containing tab
+ // as part of tab closure.
+ bool GetWebContentsDetachedToClose() const;
+
// Notification that tab closing has started. This can be called multiple
// times, subsequent calls are ignored.
void OnCloseStarted();
@@ -36,6 +40,9 @@ class CoreTabHelper : public content::WebContentsObserver,
// after all the beforeunload dialogs have finished.
void OnUnloadStarted();
+ // Called just before making the tab invisible on close.
+ void OnUnloadAboutToDetach();
+
// Set the time during close when the tab is no longer visible.
void OnUnloadDetachedStarted();
@@ -75,6 +82,9 @@ class CoreTabHelper : public content::WebContentsObserver,
// The time when the tab was removed from view during close.
base::TimeTicks unload_detached_start_time_;
+ // True if the tab was removed from a view during close.
+ bool detached_as_part_of_unload_;
+
DISALLOW_COPY_AND_ASSIGN(CoreTabHelper);
};

Powered by Google App Engine
This is Rietveld 408576698