Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Cleanup Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 DCHECK(!web_frame_ || web_frame_ == target_frame); 439 DCHECK(!web_frame_ || web_frame_ == target_frame);
440 440
441 FrameMsg_PostMessage_Params params; 441 FrameMsg_PostMessage_Params params;
442 params.is_data_raw_string = false; 442 params.is_data_raw_string = false;
443 params.data = event.data().toString(); 443 params.data = event.data().toString();
444 params.source_origin = event.origin(); 444 params.source_origin = event.origin();
445 if (!target_origin.isNull()) 445 if (!target_origin.isNull())
446 params.target_origin = target_origin.toString(); 446 params.target_origin = target_origin.toString();
447 447
448 params.message_ports = 448 params.message_ports =
449 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); 449 WebMessagePortChannelImpl::ExtractMessagePorts(event.releaseChannels());
450 450
451 // Include the routing ID for the source frame (if one exists), which the 451 // Include the routing ID for the source frame (if one exists), which the
452 // browser process will translate into the routing ID for the equivalent 452 // browser process will translate into the routing ID for the equivalent
453 // frame in the target process. 453 // frame in the target process.
454 params.source_routing_id = MSG_ROUTING_NONE; 454 params.source_routing_id = MSG_ROUTING_NONE;
455 if (source_frame) { 455 if (source_frame) {
456 RenderFrameImpl* source_render_frame = 456 RenderFrameImpl* source_render_frame =
457 RenderFrameImpl::FromWebFrame(source_frame); 457 RenderFrameImpl::FromWebFrame(source_frame);
458 if (source_render_frame) 458 if (source_render_frame)
459 params.source_routing_id = source_render_frame->GetRoutingID(); 459 params.source_routing_id = source_render_frame->GetRoutingID();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 blink::WebLocalFrame* source) { 520 blink::WebLocalFrame* source) {
521 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 521 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
522 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 522 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
523 } 523 }
524 524
525 void RenderFrameProxy::frameFocused() { 525 void RenderFrameProxy::frameFocused() {
526 Send(new FrameHostMsg_FrameFocused(routing_id_)); 526 Send(new FrameHostMsg_FrameFocused(routing_id_));
527 } 527 }
528 528
529 } // namespace 529 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698