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

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

Issue 2537953003: WebString: makes string16 conversions explicit (part 1: blink, content) (Closed)
Patch Set: fix Created 4 years 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 void RenderFrameProxy::forwardPostMessage( 417 void RenderFrameProxy::forwardPostMessage(
418 blink::WebLocalFrame* source_frame, 418 blink::WebLocalFrame* source_frame,
419 blink::WebRemoteFrame* target_frame, 419 blink::WebRemoteFrame* target_frame,
420 blink::WebSecurityOrigin target_origin, 420 blink::WebSecurityOrigin target_origin,
421 blink::WebDOMMessageEvent event) { 421 blink::WebDOMMessageEvent event) {
422 DCHECK(!web_frame_ || web_frame_ == target_frame); 422 DCHECK(!web_frame_ || web_frame_ == target_frame);
423 423
424 FrameMsg_PostMessage_Params params; 424 FrameMsg_PostMessage_Params params;
425 params.is_data_raw_string = false; 425 params.is_data_raw_string = false;
426 params.data = event.data().toString(); 426 params.data = event.data().toString().utf16();
427 params.source_origin = event.origin(); 427 params.source_origin = event.origin().utf16();
428 if (!target_origin.isNull()) 428 if (!target_origin.isNull())
429 params.target_origin = target_origin.toString(); 429 params.target_origin = target_origin.toString().utf16();
430 430
431 params.message_ports = 431 params.message_ports =
432 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels()); 432 WebMessagePortChannelImpl::ExtractMessagePortIDs(event.releaseChannels());
433 433
434 // Include the routing ID for the source frame (if one exists), which the 434 // Include the routing ID for the source frame (if one exists), which the
435 // browser process will translate into the routing ID for the equivalent 435 // browser process will translate into the routing ID for the equivalent
436 // frame in the target process. 436 // frame in the target process.
437 params.source_routing_id = MSG_ROUTING_NONE; 437 params.source_routing_id = MSG_ROUTING_NONE;
438 if (source_frame) { 438 if (source_frame) {
439 RenderFrameImpl* source_render_frame = 439 RenderFrameImpl* source_render_frame =
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 blink::WebLocalFrame* source) { 505 blink::WebLocalFrame* source) {
506 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 506 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
507 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 507 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
508 } 508 }
509 509
510 void RenderFrameProxy::frameFocused() { 510 void RenderFrameProxy::frameFocused() {
511 Send(new FrameHostMsg_FrameFocused(routing_id_)); 511 Send(new FrameHostMsg_FrameFocused(routing_id_));
512 } 512 }
513 513
514 } // namespace 514 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698