| 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 |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 416 |
| 417 void RenderFrameProxy::forwardPostMessage( | 417 void RenderFrameProxy::forwardPostMessage( |
| 418 blink::WebLocalFrame* source_frame, | 418 blink::WebLocalFrame* source_frame, |
| 419 blink::WebRemoteFrame* target_frame, | 419 blink::WebRemoteFrame* target_frame, |
| 420 blink::WebSecurityOrigin target_origin, | 420 blink::WebSecurityOrigin target_origin, |
| 421 blink::WebDOMMessageEvent event) { | 421 blink::WebDOMMessageEvent event) { |
| 422 DCHECK(!web_frame_ || web_frame_ == target_frame); | 422 DCHECK(!web_frame_ || web_frame_ == target_frame); |
| 423 | 423 |
| 424 FrameMsg_PostMessage_Params params; | 424 FrameMsg_PostMessage_Params params; |
| 425 params.is_data_raw_string = false; | 425 params.is_data_raw_string = false; |
| 426 params.data = event.data().toString(); | 426 params.data = event.data().toString().utf16(); |
| 427 params.source_origin = event.origin(); | 427 params.source_origin = event.origin().utf16(); |
| 428 if (!target_origin.isNull()) | 428 if (!target_origin.isNull()) |
| 429 params.target_origin = target_origin.toString(); | 429 params.target_origin = target_origin.toString().utf16(); |
| 430 | 430 |
| 431 params.message_ports = | 431 params.message_ports = |
| 432 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); | 432 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); |
| 433 | 433 |
| 434 // Include the routing ID for the source frame (if one exists), which the | 434 // Include the routing ID for the source frame (if one exists), which the |
| 435 // browser process will translate into the routing ID for the equivalent | 435 // browser process will translate into the routing ID for the equivalent |
| 436 // frame in the target process. | 436 // frame in the target process. |
| 437 params.source_routing_id = MSG_ROUTING_NONE; | 437 params.source_routing_id = MSG_ROUTING_NONE; |
| 438 if (source_frame) { | 438 if (source_frame) { |
| 439 RenderFrameImpl* source_render_frame = | 439 RenderFrameImpl* source_render_frame = |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 blink::WebLocalFrame* source) { | 505 blink::WebLocalFrame* source) { |
| 506 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 506 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 507 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 507 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void RenderFrameProxy::frameFocused() { | 510 void RenderFrameProxy::frameFocused() { |
| 511 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 511 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 512 } | 512 } |
| 513 | 513 |
| 514 } // namespace | 514 } // namespace |
| OLD | NEW |