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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 DCHECK(!web_frame_ || web_frame_ == target_frame); | 440 DCHECK(!web_frame_ || web_frame_ == target_frame); |
441 | 441 |
442 FrameMsg_PostMessage_Params params; | 442 FrameMsg_PostMessage_Params params; |
443 params.is_data_raw_string = false; | 443 params.is_data_raw_string = false; |
444 params.data = event.data().toString(); | 444 params.data = event.data().toString(); |
445 params.source_origin = event.origin(); | 445 params.source_origin = event.origin(); |
446 if (!target_origin.isNull()) | 446 if (!target_origin.isNull()) |
447 params.target_origin = target_origin.toString(); | 447 params.target_origin = target_origin.toString(); |
448 | 448 |
449 params.message_ports = | 449 params.message_ports = |
450 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); | 450 WebMessagePortChannelImpl::ExtractMessagePorts(event.releaseChannels()); |
451 | 451 |
452 // Include the routing ID for the source frame (if one exists), which the | 452 // Include the routing ID for the source frame (if one exists), which the |
453 // browser process will translate into the routing ID for the equivalent | 453 // browser process will translate into the routing ID for the equivalent |
454 // frame in the target process. | 454 // frame in the target process. |
455 params.source_routing_id = MSG_ROUTING_NONE; | 455 params.source_routing_id = MSG_ROUTING_NONE; |
456 if (source_frame) { | 456 if (source_frame) { |
457 RenderFrameImpl* source_render_frame = | 457 RenderFrameImpl* source_render_frame = |
458 RenderFrameImpl::FromWebFrame(source_frame); | 458 RenderFrameImpl::FromWebFrame(source_frame); |
459 if (source_render_frame) | 459 if (source_render_frame) |
460 params.source_routing_id = source_render_frame->GetRoutingID(); | 460 params.source_routing_id = source_render_frame->GetRoutingID(); |
(...skipping 66 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 |