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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 DCHECK(!web_frame_ || web_frame_ == target_frame); | 444 DCHECK(!web_frame_ || web_frame_ == target_frame); |
445 | 445 |
446 FrameMsg_PostMessage_Params params; | 446 FrameMsg_PostMessage_Params params; |
447 params.is_data_raw_string = false; | 447 params.is_data_raw_string = false; |
448 params.data = event.data().toString().utf16(); | 448 params.data = event.data().toString().utf16(); |
449 params.source_origin = event.origin().utf16(); | 449 params.source_origin = event.origin().utf16(); |
450 if (!target_origin.isNull()) | 450 if (!target_origin.isNull()) |
451 params.target_origin = target_origin.toString().utf16(); | 451 params.target_origin = target_origin.toString().utf16(); |
452 | 452 |
453 params.message_ports = | 453 params.message_ports = |
454 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); | 454 WebMessagePortChannelImpl::ExtractMessagePorts(event.releaseChannels()); |
455 | 455 |
456 // Include the routing ID for the source frame (if one exists), which the | 456 // Include the routing ID for the source frame (if one exists), which the |
457 // browser process will translate into the routing ID for the equivalent | 457 // browser process will translate into the routing ID for the equivalent |
458 // frame in the target process. | 458 // frame in the target process. |
459 params.source_routing_id = MSG_ROUTING_NONE; | 459 params.source_routing_id = MSG_ROUTING_NONE; |
460 if (source_frame) { | 460 if (source_frame) { |
461 RenderFrameImpl* source_render_frame = | 461 RenderFrameImpl* source_render_frame = |
462 RenderFrameImpl::FromWebFrame(source_frame); | 462 RenderFrameImpl::FromWebFrame(source_frame); |
463 if (source_render_frame) | 463 if (source_render_frame) |
464 params.source_routing_id = source_render_frame->GetRoutingID(); | 464 params.source_routing_id = source_render_frame->GetRoutingID(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 blink::WebLocalFrame* source) { | 527 blink::WebLocalFrame* source) { |
528 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 528 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
529 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 529 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
530 } | 530 } |
531 | 531 |
532 void RenderFrameProxy::frameFocused() { | 532 void RenderFrameProxy::frameFocused() { |
533 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 533 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
534 } | 534 } |
535 | 535 |
536 } // namespace | 536 } // namespace |
OLD | NEW |