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

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 2423233002: Preserving extra http request headers in OpenURL navigation path [relanding]. (Closed)
Patch Set: This patchset is copied from https://crrev.com/2355023002 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/renderer/render_frame_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 Send(new FrameHostMsg_RouteMessageEvent(routing_id_, params)); 447 Send(new FrameHostMsg_RouteMessageEvent(routing_id_, params));
448 } 448 }
449 449
450 void RenderFrameProxy::navigate(const blink::WebURLRequest& request, 450 void RenderFrameProxy::navigate(const blink::WebURLRequest& request,
451 bool should_replace_current_entry) { 451 bool should_replace_current_entry) {
452 FrameHostMsg_OpenURL_Params params; 452 FrameHostMsg_OpenURL_Params params;
453 params.url = request.url(); 453 params.url = request.url();
454 params.uses_post = request.httpMethod().utf8() == "POST"; 454 params.uses_post = request.httpMethod().utf8() == "POST";
455 params.resource_request_body = GetRequestBodyForWebURLRequest(request); 455 params.resource_request_body = GetRequestBodyForWebURLRequest(request);
456 params.extra_headers = GetWebURLRequestHeaders(request);
456 params.referrer = Referrer( 457 params.referrer = Referrer(
457 blink::WebStringToGURL( 458 blink::WebStringToGURL(
458 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), 459 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))),
459 request.referrerPolicy()); 460 request.referrerPolicy());
460 params.disposition = WindowOpenDisposition::CURRENT_TAB; 461 params.disposition = WindowOpenDisposition::CURRENT_TAB;
461 params.should_replace_current_entry = should_replace_current_entry; 462 params.should_replace_current_entry = should_replace_current_entry;
462 params.user_gesture = 463 params.user_gesture =
463 blink::WebUserGestureIndicator::isProcessingUserGesture(); 464 blink::WebUserGestureIndicator::isProcessingUserGesture();
464 blink::WebUserGestureIndicator::consumeUserGesture(); 465 blink::WebUserGestureIndicator::consumeUserGesture();
465 Send(new FrameHostMsg_OpenURL(routing_id_, params)); 466 Send(new FrameHostMsg_OpenURL(routing_id_, params));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 blink::WebLocalFrame* source) { 503 blink::WebLocalFrame* source) {
503 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 504 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
504 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 505 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
505 } 506 }
506 507
507 void RenderFrameProxy::frameFocused() { 508 void RenderFrameProxy::frameFocused() {
508 Send(new FrameHostMsg_FrameFocused(routing_id_)); 509 Send(new FrameHostMsg_FrameFocused(routing_id_));
509 } 510 }
510 511
511 } // namespace 512 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698