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

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

Powered by Google App Engine
This is Rietveld 408576698