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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 void RenderFrameProxy::initializeChildFrame( | 440 void RenderFrameProxy::initializeChildFrame( |
440 float scale_factor) { | 441 float scale_factor) { |
441 Send(new FrameHostMsg_InitializeChildFrame( | 442 Send(new FrameHostMsg_InitializeChildFrame( |
442 routing_id_, scale_factor)); | 443 routing_id_, scale_factor)); |
443 } | 444 } |
444 | 445 |
445 void RenderFrameProxy::navigate(const blink::WebURLRequest& request, | 446 void RenderFrameProxy::navigate(const blink::WebURLRequest& request, |
446 bool should_replace_current_entry) { | 447 bool should_replace_current_entry) { |
447 FrameHostMsg_OpenURL_Params params; | 448 FrameHostMsg_OpenURL_Params params; |
448 params.url = request.url(); | 449 params.url = request.url(); |
| 450 params.uses_post = request.httpMethod().utf8() == "POST"; |
| 451 params.resource_request_body = GetRequestBodyForWebURLRequest(request); |
449 params.referrer = Referrer( | 452 params.referrer = Referrer( |
450 blink::WebStringToGURL( | 453 blink::WebStringToGURL( |
451 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), | 454 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), |
452 request.referrerPolicy()); | 455 request.referrerPolicy()); |
453 params.disposition = CURRENT_TAB; | 456 params.disposition = CURRENT_TAB; |
454 params.should_replace_current_entry = should_replace_current_entry; | 457 params.should_replace_current_entry = should_replace_current_entry; |
455 params.user_gesture = | 458 params.user_gesture = |
456 blink::WebUserGestureIndicator::isProcessingUserGesture(); | 459 blink::WebUserGestureIndicator::isProcessingUserGesture(); |
457 blink::WebUserGestureIndicator::consumeUserGesture(); | 460 blink::WebUserGestureIndicator::consumeUserGesture(); |
458 Send(new FrameHostMsg_OpenURL(routing_id_, params)); | 461 Send(new FrameHostMsg_OpenURL(routing_id_, params)); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 blink::WebLocalFrame* source) { | 493 blink::WebLocalFrame* source) { |
491 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 494 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
492 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 495 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
493 } | 496 } |
494 | 497 |
495 void RenderFrameProxy::frameFocused() { | 498 void RenderFrameProxy::frameFocused() { |
496 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 499 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
497 } | 500 } |
498 | 501 |
499 } // namespace | 502 } // namespace |
OLD | NEW |