| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index dfc025b3bfed3b8b648df870464a2371b4a3174b..82238343cef21d1266d4cd494b41d91a2bfb0d99 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -350,6 +350,7 @@ WebContentsImpl::WebContentsImpl(
|
| notify_disconnection_(false),
|
| dialog_manager_(NULL),
|
| is_showing_before_unload_dialog_(false),
|
| + detached_as_part_of_unload_(false),
|
| closed_by_user_gesture_(false),
|
| minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)),
|
| maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)),
|
| @@ -1978,6 +1979,10 @@ void WebContentsImpl::OnUnloadStarted() {
|
| before_unload_end_time_ = base::TimeTicks::Now();
|
| }
|
|
|
| +void WebContentsImpl::OnUnloadAboutToDetach() {
|
| + detached_as_part_of_unload_ = true;
|
| +}
|
| +
|
| void WebContentsImpl::OnUnloadDetachedStarted() {
|
| if (unload_detached_start_time_.is_null())
|
| unload_detached_start_time_ = base::TimeTicks::Now();
|
| @@ -2024,6 +2029,10 @@ bool WebContentsImpl::GetClosedByUserGesture() const {
|
| return closed_by_user_gesture_;
|
| }
|
|
|
| +bool WebContentsImpl::GetWebContentsDetachedToClose() const {
|
| + return detached_as_part_of_unload_;
|
| +}
|
| +
|
| double WebContentsImpl::GetZoomLevel() const {
|
| HostZoomMapImpl* zoom_map = static_cast<HostZoomMapImpl*>(
|
| HostZoomMap::GetForBrowserContext(GetBrowserContext()));
|
|
|