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 02838bc8b8fdff01042036b2c6d1d1ad3a65dc9b..b0d31a136cfac7c5d6296248ad9d680c295f4a00 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2553,6 +2553,7 @@ void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() { |
// loading, or done loading. |
void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host, |
bool is_loading, |
+ bool to_different_document, |
LoadNotificationDetails* details) { |
if (is_loading == is_loading_) |
return; |
@@ -2570,9 +2571,11 @@ void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host, |
is_loading_ = is_loading; |
waiting_for_response_ = is_loading; |
- if (delegate_) |
- delegate_->LoadingStateChanged(this); |
- NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); |
+ if (to_different_document) { |
sky
2014/02/13 22:25:26
Seems like the delegate/observers should be told t
|
+ if (delegate_) |
+ delegate_->LoadingStateChanged(this); |
+ NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); |
+ } |
std::string url = (details ? details->url.possibly_invalid_spec() : "NULL"); |
if (is_loading) { |
@@ -2837,7 +2840,7 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, |
} |
ClearPowerSaveBlockers(rvh); |
- SetIsLoading(rvh, false, NULL); |
+ SetIsLoading(rvh, false, true, NULL); |
NotifyDisconnected(); |
SetIsCrashed(status, error_code); |
GetView()->OnTabCrashed(GetCrashedStatus(), crashed_error_code_); |
@@ -2955,8 +2958,10 @@ void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { |
delegate_->MoveContents(this, new_bounds); |
} |
-void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host) { |
- SetIsLoading(render_frame_host->GetRenderViewHost(), true, NULL); |
+void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host, |
+ bool to_different_document) { |
+ SetIsLoading(render_frame_host->GetRenderViewHost(), true, |
+ to_different_document, NULL); |
} |
void WebContentsImpl::DidStopLoading(RenderFrameHost* render_frame_host) { |
@@ -2981,7 +2986,8 @@ void WebContentsImpl::DidStopLoading(RenderFrameHost* render_frame_host) { |
controller_.GetCurrentEntryIndex())); |
} |
- SetIsLoading(render_frame_host->GetRenderViewHost(), false, details.get()); |
+ SetIsLoading(render_frame_host->GetRenderViewHost(), false, true, |
+ details.get()); |
} |
void WebContentsImpl::DidCancelLoading() { |