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

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

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: Addressed nate's comments Created 3 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
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/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) 2472 if (!common_params.url.SchemeIs(url::kJavaScriptScheme))
2473 OnDidStartLoading(true); 2473 OnDidStartLoading(true);
2474 } 2474 }
2475 2475
2476 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { 2476 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) {
2477 DCHECK(data_url.SchemeIs(url::kDataScheme)); 2477 DCHECK(data_url.SchemeIs(url::kDataScheme));
2478 CommonNavigationParams common_params( 2478 CommonNavigationParams common_params(
2479 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, 2479 data_url, Referrer(), ui::PAGE_TRANSITION_LINK,
2480 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, 2480 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false,
2481 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, 2481 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT,
2482 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); 2482 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr,
2483 base::Optional<SourceLocation>());
2483 if (IsBrowserSideNavigationEnabled()) { 2484 if (IsBrowserSideNavigationEnabled()) {
2484 CommitNavigation(nullptr, nullptr, common_params, RequestNavigationParams(), 2485 CommitNavigation(nullptr, nullptr, common_params, RequestNavigationParams(),
2485 false); 2486 false);
2486 } else { 2487 } else {
2487 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); 2488 Navigate(common_params, StartNavigationParams(), RequestNavigationParams());
2488 } 2489 }
2489 } 2490 }
2490 2491
2491 void RenderFrameHostImpl::Stop() { 2492 void RenderFrameHostImpl::Stop() {
2492 Send(new FrameMsg_Stop(routing_id_)); 2493 Send(new FrameMsg_Stop(routing_id_));
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
3456 // There is no pending NavigationEntry in these cases, so pass 0 as the 3457 // There is no pending NavigationEntry in these cases, so pass 0 as the
3457 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3458 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3459 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3459 return NavigationHandleImpl::Create( 3460 return NavigationHandleImpl::Create(
3460 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3461 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3461 params.was_within_same_page, base::TimeTicks::Now(), 3462 params.was_within_same_page, base::TimeTicks::Now(),
3462 entry_id_for_data_nav, false); // started_from_context_menu 3463 entry_id_for_data_nav, false); // started_from_context_menu
3463 } 3464 }
3464 3465
3465 } // namespace content 3466 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698