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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 DCHECK(!web_frame_ || web_frame_ == target_frame); | 458 DCHECK(!web_frame_ || web_frame_ == target_frame); |
459 | 459 |
460 FrameMsg_PostMessage_Params params; | 460 FrameMsg_PostMessage_Params params; |
461 params.is_data_raw_string = false; | 461 params.is_data_raw_string = false; |
462 params.data = event.data().toString(); | 462 params.data = event.data().toString(); |
463 params.source_origin = event.origin(); | 463 params.source_origin = event.origin(); |
464 if (!target_origin.isNull()) | 464 if (!target_origin.isNull()) |
465 params.target_origin = target_origin.toString(); | 465 params.target_origin = target_origin.toString(); |
466 | 466 |
467 params.message_ports = | 467 params.message_ports = |
468 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); | 468 WebMessagePortChannelImpl::ExtractMessagePorts(event.releaseChannels()); |
469 | 469 |
470 // Include the routing ID for the source frame (if one exists), which the | 470 // Include the routing ID for the source frame (if one exists), which the |
471 // browser process will translate into the routing ID for the equivalent | 471 // browser process will translate into the routing ID for the equivalent |
472 // frame in the target process. | 472 // frame in the target process. |
473 params.source_routing_id = MSG_ROUTING_NONE; | 473 params.source_routing_id = MSG_ROUTING_NONE; |
474 if (source_frame) { | 474 if (source_frame) { |
475 RenderFrameImpl* source_render_frame = | 475 RenderFrameImpl* source_render_frame = |
476 RenderFrameImpl::FromWebFrame(source_frame); | 476 RenderFrameImpl::FromWebFrame(source_frame); |
477 if (source_render_frame) | 477 if (source_render_frame) |
478 params.source_routing_id = source_render_frame->GetRoutingID(); | 478 params.source_routing_id = source_render_frame->GetRoutingID(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 blink::WebLocalFrame* source) { | 541 blink::WebLocalFrame* source) { |
542 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 542 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
543 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 543 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
544 } | 544 } |
545 | 545 |
546 void RenderFrameProxy::frameFocused() { | 546 void RenderFrameProxy::frameFocused() { |
547 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 547 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
548 } | 548 } |
549 | 549 |
550 } // namespace | 550 } // namespace |
OLD | NEW |