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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/interstitial_page_impl.h" 5 #include "content/browser/frame_host/interstitial_page_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 rwh_view->Hide(); 429 rwh_view->Hide();
430 } 430 }
431 431
432 // Notify the tab we are not loading so the throbber is stopped. It also 432 // Notify the tab we are not loading so the throbber is stopped. It also
433 // causes a WebContentsObserver::DidStopLoading callback that the 433 // causes a WebContentsObserver::DidStopLoading callback that the
434 // AutomationProvider (used by the UI tests) expects to consider a navigation 434 // AutomationProvider (used by the UI tests) expects to consider a navigation
435 // as complete. Without this, navigating in a UI test to a URL that triggers 435 // as complete. Without this, navigating in a UI test to a URL that triggers
436 // an interstitial would hang. 436 // an interstitial would hang.
437 web_contents_was_loading_ = controller_->delegate()->IsLoading(); 437 web_contents_was_loading_ = controller_->delegate()->IsLoading();
438 controller_->delegate()->SetIsLoading( 438 controller_->delegate()->SetIsLoading(
439 controller_->delegate()->GetRenderViewHost(), false, NULL); 439 controller_->delegate()->GetRenderViewHost(), false, true, NULL);
440 } 440 }
441 441
442 void InterstitialPageImpl::UpdateTitle( 442 void InterstitialPageImpl::UpdateTitle(
443 RenderViewHost* render_view_host, 443 RenderViewHost* render_view_host,
444 int32 page_id, 444 int32 page_id,
445 const base::string16& title, 445 const base::string16& title,
446 base::i18n::TextDirection title_direction) { 446 base::i18n::TextDirection title_direction) {
447 if (!enabled()) 447 if (!enabled())
448 return; 448 return;
449 449
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 if (action_taken_ != NO_ACTION) { 574 if (action_taken_ != NO_ACTION) {
575 NOTREACHED(); 575 NOTREACHED();
576 return; 576 return;
577 } 577 }
578 Disable(); 578 Disable();
579 action_taken_ = PROCEED_ACTION; 579 action_taken_ = PROCEED_ACTION;
580 580
581 // Resumes the throbber, if applicable. 581 // Resumes the throbber, if applicable.
582 if (web_contents_was_loading_) 582 if (web_contents_was_loading_)
583 controller_->delegate()->SetIsLoading( 583 controller_->delegate()->SetIsLoading(
584 controller_->delegate()->GetRenderViewHost(), true, NULL); 584 controller_->delegate()->GetRenderViewHost(), true, true, NULL);
585 585
586 // If this is a new navigation, the old page is going away, so we cancel any 586 // If this is a new navigation, the old page is going away, so we cancel any
587 // blocked requests for it. If it is not a new navigation, then it means the 587 // blocked requests for it. If it is not a new navigation, then it means the
588 // interstitial was shown as a result of a resource loading in the page. 588 // interstitial was shown as a result of a resource loading in the page.
589 // Since the user wants to proceed, we'll let any blocked request go through. 589 // Since the user wants to proceed, we'll let any blocked request go through.
590 if (new_navigation_) 590 if (new_navigation_)
591 TakeActionOnResourceDispatcher(CANCEL); 591 TakeActionOnResourceDispatcher(CANCEL);
592 else 592 else
593 TakeActionOnResourceDispatcher(RESUME); 593 TakeActionOnResourceDispatcher(RESUME);
594 594
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 853
854 web_contents->GetDelegateView()->TakeFocus(reverse); 854 web_contents->GetDelegateView()->TakeFocus(reverse);
855 } 855 }
856 856
857 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 857 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
858 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 858 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
859 int active_match_ordinal, bool final_update) { 859 int active_match_ordinal, bool final_update) {
860 } 860 }
861 861
862 } // namespace content 862 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698