OLD | NEW |
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 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "content/child/web_url_request_util.h" |
13 #include "content/child/webmessageportchannel_impl.h" | 14 #include "content/child/webmessageportchannel_impl.h" |
14 #include "content/common/content_security_policy_header.h" | 15 #include "content/common/content_security_policy_header.h" |
15 #include "content/common/frame_messages.h" | 16 #include "content/common/frame_messages.h" |
16 #include "content/common/frame_replication_state.h" | 17 #include "content/common/frame_replication_state.h" |
17 #include "content/common/input_messages.h" | 18 #include "content/common/input_messages.h" |
18 #include "content/common/page_messages.h" | 19 #include "content/common/page_messages.h" |
19 #include "content/common/site_isolation_policy.h" | 20 #include "content/common/site_isolation_policy.h" |
20 #include "content/common/swapped_out_messages.h" | 21 #include "content/common/swapped_out_messages.h" |
21 #include "content/common/view_messages.h" | 22 #include "content/common/view_messages.h" |
22 #include "content/renderer/child_frame_compositing_helper.h" | 23 #include "content/renderer/child_frame_compositing_helper.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 void RenderFrameProxy::initializeChildFrame( | 442 void RenderFrameProxy::initializeChildFrame( |
442 float scale_factor) { | 443 float scale_factor) { |
443 Send(new FrameHostMsg_InitializeChildFrame( | 444 Send(new FrameHostMsg_InitializeChildFrame( |
444 routing_id_, scale_factor)); | 445 routing_id_, scale_factor)); |
445 } | 446 } |
446 | 447 |
447 void RenderFrameProxy::navigate(const blink::WebURLRequest& request, | 448 void RenderFrameProxy::navigate(const blink::WebURLRequest& request, |
448 bool should_replace_current_entry) { | 449 bool should_replace_current_entry) { |
449 FrameHostMsg_OpenURL_Params params; | 450 FrameHostMsg_OpenURL_Params params; |
450 params.url = request.url(); | 451 params.url = request.url(); |
| 452 params.uses_post = request.httpMethod().utf8() == "POST"; |
| 453 params.resource_request_body = GetRequestBodyForWebURLRequest(request); |
451 params.referrer = Referrer( | 454 params.referrer = Referrer( |
452 blink::WebStringToGURL( | 455 blink::WebStringToGURL( |
453 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), | 456 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), |
454 request.referrerPolicy()); | 457 request.referrerPolicy()); |
455 params.disposition = CURRENT_TAB; | 458 params.disposition = CURRENT_TAB; |
456 params.should_replace_current_entry = should_replace_current_entry; | 459 params.should_replace_current_entry = should_replace_current_entry; |
457 params.user_gesture = | 460 params.user_gesture = |
458 blink::WebUserGestureIndicator::isProcessingUserGesture(); | 461 blink::WebUserGestureIndicator::isProcessingUserGesture(); |
459 blink::WebUserGestureIndicator::consumeUserGesture(); | 462 blink::WebUserGestureIndicator::consumeUserGesture(); |
460 Send(new FrameHostMsg_OpenURL(routing_id_, params)); | 463 Send(new FrameHostMsg_OpenURL(routing_id_, params)); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 blink::WebLocalFrame* source) { | 495 blink::WebLocalFrame* source) { |
493 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 496 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
494 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 497 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
495 } | 498 } |
496 | 499 |
497 void RenderFrameProxy::frameFocused() { | 500 void RenderFrameProxy::frameFocused() { |
498 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 501 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
499 } | 502 } |
500 | 503 |
501 } // namespace | 504 } // namespace |
OLD | NEW |