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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 2879853002: PlzNavigate: Fix form submission to OOPIF frame. (Closed)
Patch Set: Addressed comments Nasko@ Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index c677f372f5767093b64cb134621ef84a3f4c3e10..11be66b7c2954c7b70d18a8886612b696f58551d 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -370,10 +370,10 @@ bool NavigatorImpl::NavigateToEntry(
if (IsBrowserSideNavigationEnabled()) {
navigation_data_.reset(new NavigationMetricsData(navigation_start, dest_url,
entry.restore_type()));
- RequestNavigation(frame_tree_node, dest_url, dest_referrer, frame_entry,
- entry, reload_type, previews_state,
- is_same_document_history_load,
- is_history_navigation_in_new_child, navigation_start);
+ RequestNavigation(
+ frame_tree_node, dest_url, dest_referrer, frame_entry, entry,
+ reload_type, previews_state, is_same_document_history_load,
+ is_history_navigation_in_new_child, post_body, navigation_start);
if (frame_tree_node->IsMainFrame() &&
frame_tree_node->navigation_request()) {
// TODO(carlosk): extend these traces to support subframes and
@@ -889,6 +889,9 @@ void NavigatorImpl::RequestTransferURL(
if (controller_->GetLastCommittedEntry()) {
entry = controller_->GetLastCommittedEntry()->Clone();
entry->set_extra_headers(extra_headers);
+ // TODO(arthursonzogni): What about |is_renderer_initiated|?
+ // Renderer-initiated navigation that target a remote frame are currently
+ // classified as browser-initiated when this one has already navigated.
Charlie Reis 2017/05/12 23:50:20 This is a good question. Do you know any conseque
arthursonzogni 2017/05/15 09:48:15 I did a quick look at the possible consequences. I
} else {
// If there's no last committed entry, create an entry for about:blank
// with a subframe entry for our destination.
@@ -1119,16 +1122,18 @@ void NavigatorImpl::DiscardPendingEntryIfNeeded(NavigationHandleImpl* handle) {
}
// PlzNavigate
-void NavigatorImpl::RequestNavigation(FrameTreeNode* frame_tree_node,
- const GURL& dest_url,
- const Referrer& dest_referrer,
- const FrameNavigationEntry& frame_entry,
- const NavigationEntryImpl& entry,
- ReloadType reload_type,
- PreviewsState previews_state,
- bool is_same_document_history_load,
- bool is_history_navigation_in_new_child,
- base::TimeTicks navigation_start) {
+void NavigatorImpl::RequestNavigation(
+ FrameTreeNode* frame_tree_node,
+ const GURL& dest_url,
+ const Referrer& dest_referrer,
+ const FrameNavigationEntry& frame_entry,
+ const NavigationEntryImpl& entry,
+ ReloadType reload_type,
+ PreviewsState previews_state,
+ bool is_same_document_history_load,
+ bool is_history_navigation_in_new_child,
+ const scoped_refptr<ResourceRequestBodyImpl>& post_body,
+ base::TimeTicks navigation_start) {
CHECK(IsBrowserSideNavigationEnabled());
DCHECK(frame_tree_node);
@@ -1152,7 +1157,8 @@ void NavigatorImpl::RequestNavigation(FrameTreeNode* frame_tree_node,
NavigationRequest::CreateBrowserInitiated(
frame_tree_node, dest_url, dest_referrer, frame_entry, entry,
navigation_type, previews_state, is_same_document_history_load,
- is_history_navigation_in_new_child, navigation_start, controller_);
+ is_history_navigation_in_new_child, post_body, navigation_start,
+ controller_);
// Navigation to a javascript URL is not a "real" navigation so there is no
// need to create a NavigationHandle. The navigation commits immediately and
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698