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

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

Issue 2475693002: Do not reset NavigationHandle when navigating same-page (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
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_navigator_impl.h" 5 #include "content/browser/frame_host/interstitial_page_navigator_impl.h"
6 6
7 #include "content/browser/frame_host/interstitial_page_impl.h" 7 #include "content/browser/frame_host/interstitial_page_impl.h"
8 #include "content/browser/frame_host/navigation_controller_impl.h" 8 #include "content/browser/frame_host/navigation_controller_impl.h"
9 #include "content/browser/frame_host/navigator_delegate.h" 9 #include "content/browser/frame_host/navigator_delegate.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 27 matching lines...) Expand all
38 false, // is_renderer_initiated 38 false, // is_renderer_initiated
39 false, // is_synchronous 39 false, // is_synchronous
40 false, // is_srcdoc 40 false, // is_srcdoc
41 navigation_start, 41 navigation_start,
42 0, // pending_nav_entry_id 42 0, // pending_nav_entry_id
43 false); // started_in_context_menu 43 false); // started_in_context_menu
44 } 44 }
45 45
46 void InterstitialPageNavigatorImpl::DidNavigate( 46 void InterstitialPageNavigatorImpl::DidNavigate(
47 RenderFrameHostImpl* render_frame_host, 47 RenderFrameHostImpl* render_frame_host,
48 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) { 48 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params,
49 if (navigation_handle_) { 49 std::unique_ptr<NavigationHandleImpl> navigation_handle) {
50 if (!navigation_handle->IsSamePage() && navigation_handle_) {
Charlie Reis 2016/11/04 17:30:53 Hmm, I think we should look more closely at this.
clamy 2016/11/07 14:10:51 Actually, it is impossible for navigation_handle_
Charlie Reis 2016/11/08 06:38:53 Much better-- thanks!
50 navigation_handle_->DidCommitNavigation(input_params, false, 51 navigation_handle_->DidCommitNavigation(input_params, false,
51 render_frame_host); 52 render_frame_host);
52 navigation_handle_.reset(); 53 navigation_handle_.reset();
53 } 54 }
54 55
55 // TODO(nasko): Move implementation here, but for the time being call out 56 // TODO(nasko): Move implementation here, but for the time being call out
56 // to the interstitial page code. 57 // to the interstitial page code.
57 interstitial_->DidNavigate(render_frame_host->render_view_host(), 58 interstitial_->DidNavigate(render_frame_host->render_view_host(),
58 input_params); 59 input_params);
59 } 60 }
60 61
61 NavigationHandleImpl* 62 NavigationHandleImpl*
62 InterstitialPageNavigatorImpl::GetNavigationHandleForFrameHost( 63 InterstitialPageNavigatorImpl::GetNavigationHandleForFrameHost(
63 RenderFrameHostImpl* render_frame_host) { 64 RenderFrameHostImpl* render_frame_host) {
64 return navigation_handle_.get(); 65 return navigation_handle_.get();
65 } 66 }
66 67
67 } // namespace content 68 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698