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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 290733004: Don't spin the loading indicator for in-page navigations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better? Created 6 years, 7 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44a2a78bffa46a2f24a4b6bc49403bf4593f99cd..3459923afc4aab06f4ffbdf01356ba276e477411 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -334,6 +334,7 @@ WebContentsImpl::WebContentsImpl(
frame_tree_(new NavigatorImpl(&controller_, this),
this, this, this, this),
is_loading_(false),
+ is_load_to_different_document_(false),
crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING),
crashed_error_code_(0),
waiting_for_response_(false),
@@ -846,8 +847,12 @@ bool WebContentsImpl::IsLoading() const {
return is_loading_;
}
+bool WebContentsImpl::IsLoadingToDifferentDocument() const {
+ return is_loading_ && is_load_to_different_document_;
+}
+
bool WebContentsImpl::IsWaitingForResponse() const {
- return waiting_for_response_;
+ return waiting_for_response_ && is_load_to_different_document_;
}
const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const {
@@ -3000,6 +3005,7 @@ void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host,
is_loading_ = is_loading;
waiting_for_response_ = is_loading;
+ is_load_to_different_document_ = to_different_document;
if (delegate_)
delegate_->LoadingStateChanged(this, to_different_document);
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698