Index: chrome/browser/ui/tab_contents/core_tab_helper.cc |
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.cc b/chrome/browser/ui/tab_contents/core_tab_helper.cc |
index f8dc42ef7ab5af1b56897424ac89ce1f000f5b12..06492b3d21d5a857e43befbc10044a1053000bb6 100644 |
--- a/chrome/browser/ui/tab_contents/core_tab_helper.cc |
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.cc |
@@ -19,7 +19,8 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(CoreTabHelper); |
CoreTabHelper::CoreTabHelper(WebContents* web_contents) |
: content::WebContentsObserver(web_contents), |
- delegate_(NULL) { |
+ delegate_(NULL), |
+ detached_as_part_of_unload_(false) { |
} |
CoreTabHelper::~CoreTabHelper() { |
@@ -85,6 +86,10 @@ string16 CoreTabHelper::GetStatusText() const { |
return string16(); |
} |
+bool CoreTabHelper::GetWebContentsDetachedToClose() const { |
+ return detached_as_part_of_unload_; |
+} |
+ |
void CoreTabHelper::OnCloseStarted() { |
if (close_start_time_.is_null()) |
close_start_time_ = base::TimeTicks::Now(); |
@@ -100,6 +105,10 @@ void CoreTabHelper::OnUnloadStarted() { |
before_unload_end_time_ = base::TimeTicks::Now(); |
} |
+void CoreTabHelper::OnUnloadAboutToDetach() { |
+ detached_as_part_of_unload_ = true; |
+} |
+ |
void CoreTabHelper::OnUnloadDetachedStarted() { |
if (unload_detached_start_time_.is_null()) |
unload_detached_start_time_ = base::TimeTicks::Now(); |