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

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

Issue 2419093002: Revert of Preserving Content-Type header from http request in OpenURL path. (Closed)
Patch Set: Manually resolved conflicts with r425338 in navigator_impl.cc. Created 4 years, 2 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host(); 251 RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host();
252 if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance())) 252 if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance()))
253 return; 253 return;
254 254
255 // Since this navigation targeted a specific RenderFrameProxy, it should stay 255 // Since this navigation targeted a specific RenderFrameProxy, it should stay
256 // in the current tab. 256 // in the current tab.
257 DCHECK_EQ(WindowOpenDisposition::CURRENT_TAB, params.disposition); 257 DCHECK_EQ(WindowOpenDisposition::CURRENT_TAB, params.disposition);
258 258
259 // TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be 259 // TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be
260 // passed in as well. 260 // passed in as well.
261 // TODO(lfg, lukasza): Remove |extra_headers| parameter from
262 // RequestTransferURL method once both RenderFrameProxyHost and
263 // RenderFrameHostImpl call RequestOpenURL from their OnOpenURL handlers.
264 // See also https://crbug.com/647772.
265 frame_tree_node_->navigator()->RequestTransferURL( 261 frame_tree_node_->navigator()->RequestTransferURL(
266 current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(), 262 current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(),
267 params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(), 263 params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(),
268 params.should_replace_current_entry, params.uses_post ? "POST" : "GET", 264 params.should_replace_current_entry, params.uses_post ? "POST" : "GET",
269 params.resource_request_body, params.extra_headers); 265 params.resource_request_body);
270 } 266 }
271 267
272 void RenderFrameProxyHost::OnRouteMessageEvent( 268 void RenderFrameProxyHost::OnRouteMessageEvent(
273 const FrameMsg_PostMessage_Params& params) { 269 const FrameMsg_PostMessage_Params& params) {
274 RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host(); 270 RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host();
275 271
276 // Only deliver the message if the request came from a RenderFrameHost in the 272 // Only deliver the message if the request came from a RenderFrameHost in the
277 // same BrowsingInstance or if this WebContents is dedicated to a browser 273 // same BrowsingInstance or if this WebContents is dedicated to a browser
278 // plugin guest. 274 // plugin guest.
279 // 275 //
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, 366 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type,
371 source_proxy_routing_id)); 367 source_proxy_routing_id));
372 } 368 }
373 369
374 void RenderFrameProxyHost::OnFrameFocused() { 370 void RenderFrameProxyHost::OnFrameFocused() {
375 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame( 371 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame(
376 frame_tree_node_, GetSiteInstance()); 372 frame_tree_node_, GetSiteInstance());
377 } 373 }
378 374
379 } // namespace content 375 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698