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