OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/navigation_handle_impl.h" | 5 #include "content/browser/frame_host/navigation_handle_impl.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 | 8 |
9 #include "base/debug/dump_without_crashing.h" | 9 #include "base/debug/dump_without_crashing.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 if (result != NavigationThrottle::DEFER) | 557 if (result != NavigationThrottle::DEFER) |
558 RunCompleteCallback(result); | 558 RunCompleteCallback(result); |
559 } | 559 } |
560 | 560 |
561 void NavigationHandleImpl::ReadyToCommitNavigation( | 561 void NavigationHandleImpl::ReadyToCommitNavigation( |
562 RenderFrameHostImpl* render_frame_host) { | 562 RenderFrameHostImpl* render_frame_host) { |
563 DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); | 563 DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); |
564 render_frame_host_ = render_frame_host; | 564 render_frame_host_ = render_frame_host; |
565 state_ = READY_TO_COMMIT; | 565 state_ = READY_TO_COMMIT; |
566 | 566 |
567 if (!IsRendererDebugURL(url_)) | 567 if (!IsRendererDebugURL(url_) && !IsSamePage()) |
568 GetDelegate()->ReadyToCommitNavigation(this); | 568 GetDelegate()->ReadyToCommitNavigation(this); |
569 } | 569 } |
570 | 570 |
571 void NavigationHandleImpl::DidCommitNavigation( | 571 void NavigationHandleImpl::DidCommitNavigation( |
572 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, | 572 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, |
573 bool same_page, | 573 bool same_page, |
574 RenderFrameHostImpl* render_frame_host) { | 574 RenderFrameHostImpl* render_frame_host) { |
575 DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); | 575 DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); |
576 DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node()); | 576 DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node()); |
577 CHECK_EQ(url_, params.url); | 577 CHECK_EQ(url_, params.url); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 content::AncestorThrottle::MaybeCreateThrottleFor(this); | 834 content::AncestorThrottle::MaybeCreateThrottleFor(this); |
835 if (ancestor_throttle) | 835 if (ancestor_throttle) |
836 throttles_.push_back(std::move(ancestor_throttle)); | 836 throttles_.push_back(std::move(ancestor_throttle)); |
837 | 837 |
838 throttles_.insert(throttles_.begin(), | 838 throttles_.insert(throttles_.begin(), |
839 std::make_move_iterator(throttles_to_register.begin()), | 839 std::make_move_iterator(throttles_to_register.begin()), |
840 std::make_move_iterator(throttles_to_register.end())); | 840 std::make_move_iterator(throttles_to_register.end())); |
841 } | 841 } |
842 | 842 |
843 } // namespace content | 843 } // namespace content |
OLD | NEW |