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

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

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on top of separate CL that moves POST body to CommonNavigationParams. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_proxy_host.h" 5 #include "content/browser/frame_host/render_frame_proxy_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/browser/bad_message.h" 10 #include "content/browser/bad_message.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host(); 243 RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host();
244 if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance())) 244 if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance()))
245 return; 245 return;
246 246
247 // Since this navigation targeted a specific RenderFrameProxy, it should stay 247 // Since this navigation targeted a specific RenderFrameProxy, it should stay
248 // in the current tab. 248 // in the current tab.
249 DCHECK_EQ(CURRENT_TAB, params.disposition); 249 DCHECK_EQ(CURRENT_TAB, params.disposition);
250 250
251 // TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be 251 // TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be
252 // passed in as well. 252 // passed in as well.
253 // TODO(lukasza): https://crbug.com/344348: Pass real method and post_data.
253 frame_tree_node_->navigator()->RequestTransferURL( 254 frame_tree_node_->navigator()->RequestTransferURL(
254 current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(), 255 current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(),
255 params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(), 256 params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(),
256 params.should_replace_current_entry); 257 params.should_replace_current_entry, "GET", nullptr);
257 } 258 }
258 259
259 void RenderFrameProxyHost::OnRouteMessageEvent( 260 void RenderFrameProxyHost::OnRouteMessageEvent(
260 const FrameMsg_PostMessage_Params& params) { 261 const FrameMsg_PostMessage_Params& params) {
261 RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host(); 262 RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host();
262 263
263 // Only deliver the message if the request came from a RenderFrameHost in the 264 // Only deliver the message if the request came from a RenderFrameHost in the
264 // same BrowsingInstance or if this WebContents is dedicated to a browser 265 // same BrowsingInstance or if this WebContents is dedicated to a browser
265 // plugin guest. 266 // plugin guest.
266 // 267 //
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, 358 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type,
358 source_proxy_routing_id)); 359 source_proxy_routing_id));
359 } 360 }
360 361
361 void RenderFrameProxyHost::OnFrameFocused() { 362 void RenderFrameProxyHost::OnFrameFocused() {
362 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, 363 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_,
363 GetSiteInstance()); 364 GetSiteInstance());
364 } 365 }
365 366
366 } // namespace content 367 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698