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

Unified Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 1693353002: Reland #2 Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits + rebase Created 4 years, 10 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: content/browser/frame_host/interstitial_page_impl.cc
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index 1ad4907bda546a2f637cfe9f7be0ad4eddbcecfc..4d071e3c39eed2d5d34834299dfeb2c3fa2c2e23 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -159,15 +159,17 @@ InterstitialPageImpl::InterstitialPageImpl(
// TODO(creis): We will also need to pass delegates for the RVHM as we
// start to use it.
frame_tree_(new InterstitialPageNavigatorImpl(this, controller_),
- this, this, this,
+ this,
+ this,
+ this,
static_cast<WebContentsImpl*>(web_contents)),
original_child_id_(web_contents->GetRenderProcessHost()->GetID()),
original_rvh_id_(web_contents->GetRenderViewHost()->GetRoutingID()),
should_revert_web_contents_title_(false),
- web_contents_was_loading_(false),
resource_dispatcher_host_notified_(false),
rvh_delegate_view_(new InterstitialPageRVHDelegateView(this)),
create_view_(true),
+ pause_throbber_(false),
delegate_(delegate),
weak_ptr_factory_(this) {
InitInterstitialPageMap();
@@ -501,6 +503,9 @@ void InterstitialPageImpl::DidNavigate(
return;
}
+ // The interstitial is not loading anymore so stop the throbber.
+ pause_throbber_ = true;
+
// The RenderViewHost has loaded its contents, we can show it now.
if (!controller_->delegate()->IsHidden())
render_view_host_->GetWidget()->GetView()->Show();
@@ -518,14 +523,6 @@ void InterstitialPageImpl::DidNavigate(
// Hide the original RVH since we're showing the interstitial instead.
rwh_view->Hide();
}
-
- // Notify the tab we are not loading so the throbber is stopped. It also
- // causes a WebContentsObserver::DidStopLoading callback that the
- // AutomationProvider (used by the UI tests) expects to consider a navigation
- // as complete. Without this, navigating in a UI test to a URL that triggers
- // an interstitial would hang.
- web_contents_was_loading_ = controller_->delegate()->IsLoading();
- controller_->delegate()->SetIsLoading(false, true, NULL);
}
RendererPreferences InterstitialPageImpl::GetRendererPrefs(
@@ -635,8 +632,8 @@ void InterstitialPageImpl::Proceed() {
action_taken_ = PROCEED_ACTION;
// Resumes the throbber, if applicable.
- if (web_contents_was_loading_)
- controller_->delegate()->SetIsLoading(true, true, NULL);
+ pause_throbber_ = false;
+ controller_->delegate()->DidProceedOnInterstitial();
// If this is a new navigation, the old page is going away, so we cancel any
// blocked requests for it. If it is not a new navigation, then it means the
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.h ('k') | content/browser/frame_host/navigation_controller_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698