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

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, 8 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 rwh_view->Hide(); 451 rwh_view->Hide();
452 } 452 }
453 453
454 // Notify the tab we are not loading so the throbber is stopped. It also 454 // Notify the tab we are not loading so the throbber is stopped. It also
455 // causes a WebContentsObserver::DidStopLoading callback that the 455 // causes a WebContentsObserver::DidStopLoading callback that the
456 // AutomationProvider (used by the UI tests) expects to consider a navigation 456 // AutomationProvider (used by the UI tests) expects to consider a navigation
457 // as complete. Without this, navigating in a UI test to a URL that triggers 457 // as complete. Without this, navigating in a UI test to a URL that triggers
458 // an interstitial would hang. 458 // an interstitial would hang.
459 web_contents_was_loading_ = controller_->delegate()->IsLoading(); 459 web_contents_was_loading_ = controller_->delegate()->IsLoading();
460 controller_->delegate()->SetIsLoading( 460 controller_->delegate()->SetIsLoading(
461 controller_->delegate()->GetRenderViewHost(), false, NULL); 461 controller_->delegate()->GetRenderViewHost(), false, true, NULL);
462 } 462 }
463 463
464 void InterstitialPageImpl::UpdateTitle( 464 void InterstitialPageImpl::UpdateTitle(
465 RenderViewHost* render_view_host, 465 RenderViewHost* render_view_host,
466 int32 page_id, 466 int32 page_id,
467 const base::string16& title, 467 const base::string16& title,
468 base::i18n::TextDirection title_direction) { 468 base::i18n::TextDirection title_direction) {
469 if (!enabled()) 469 if (!enabled())
470 return; 470 return;
471 471
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 if (action_taken_ != NO_ACTION) { 596 if (action_taken_ != NO_ACTION) {
597 NOTREACHED(); 597 NOTREACHED();
598 return; 598 return;
599 } 599 }
600 Disable(); 600 Disable();
601 action_taken_ = PROCEED_ACTION; 601 action_taken_ = PROCEED_ACTION;
602 602
603 // Resumes the throbber, if applicable. 603 // Resumes the throbber, if applicable.
604 if (web_contents_was_loading_) 604 if (web_contents_was_loading_)
605 controller_->delegate()->SetIsLoading( 605 controller_->delegate()->SetIsLoading(
606 controller_->delegate()->GetRenderViewHost(), true, NULL); 606 controller_->delegate()->GetRenderViewHost(), true, true, NULL);
607 607
608 // If this is a new navigation, the old page is going away, so we cancel any 608 // If this is a new navigation, the old page is going away, so we cancel any
609 // blocked requests for it. If it is not a new navigation, then it means the 609 // blocked requests for it. If it is not a new navigation, then it means the
610 // interstitial was shown as a result of a resource loading in the page. 610 // interstitial was shown as a result of a resource loading in the page.
611 // Since the user wants to proceed, we'll let any blocked request go through. 611 // Since the user wants to proceed, we'll let any blocked request go through.
612 if (new_navigation_) 612 if (new_navigation_)
613 TakeActionOnResourceDispatcher(CANCEL); 613 TakeActionOnResourceDispatcher(CANCEL);
614 else 614 else
615 TakeActionOnResourceDispatcher(RESUME); 615 TakeActionOnResourceDispatcher(RESUME);
616 616
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 897
898 web_contents->GetDelegateView()->TakeFocus(reverse); 898 web_contents->GetDelegateView()->TakeFocus(reverse);
899 } 899 }
900 900
901 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 901 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
902 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 902 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
903 int active_match_ordinal, bool final_update) { 903 int active_match_ordinal, bool final_update) {
904 } 904 }
905 905
906 } // namespace content 906 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698