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

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

Issue 886923004: Update createRemoteChild to pass SandboxFlags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/child/webmessageportchannel_impl.h" 10 #include "content/child/webmessageportchannel_impl.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 render_view = RenderViewImpl::FromRoutingID(render_view_routing_id); 67 render_view = RenderViewImpl::FromRoutingID(render_view_routing_id);
68 web_frame = blink::WebRemoteFrame::create(proxy.get()); 68 web_frame = blink::WebRemoteFrame::create(proxy.get());
69 render_view->webview()->setMainFrame(web_frame); 69 render_view->webview()->setMainFrame(web_frame);
70 } else { 70 } else {
71 // Create a frame under an existing parent. The parent is always expected 71 // Create a frame under an existing parent. The parent is always expected
72 // to be a RenderFrameProxy, because navigations initiated by local frames 72 // to be a RenderFrameProxy, because navigations initiated by local frames
73 // should not wind up here. 73 // should not wind up here.
74 RenderFrameProxy* parent = 74 RenderFrameProxy* parent =
75 RenderFrameProxy::FromRoutingID(parent_routing_id); 75 RenderFrameProxy::FromRoutingID(parent_routing_id);
76 web_frame = parent->web_frame()->createRemoteChild( 76 web_frame = parent->web_frame()->createRemoteChild(
77 blink::WebString::fromUTF8(replicated_state.name), proxy.get()); 77 blink::WebString::fromUTF8(replicated_state.name),
78 RenderFrameImpl::ContentToWebSandboxFlags(
79 replicated_state.sandbox_flags),
80 proxy.get());
78 render_view = parent->render_view(); 81 render_view = parent->render_view();
79 } 82 }
80 83
81 proxy->Init(web_frame, render_view); 84 proxy->Init(web_frame, render_view);
82 85
83 // Initialize proxy's WebRemoteFrame with the security origin and other 86 // Initialize proxy's WebRemoteFrame with the security origin and other
84 // replicated information. 87 // replicated information.
85 proxy->SetReplicatedState(replicated_state); 88 proxy->SetReplicatedState(replicated_state);
86 89
87 return proxy.release(); 90 return proxy.release();
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 blink::WebUserGestureIndicator::isProcessingUserGesture(); 323 blink::WebUserGestureIndicator::isProcessingUserGesture();
321 blink::WebUserGestureIndicator::consumeUserGesture(); 324 blink::WebUserGestureIndicator::consumeUserGesture();
322 Send(new FrameHostMsg_OpenURL(routing_id_, params)); 325 Send(new FrameHostMsg_OpenURL(routing_id_, params));
323 } 326 }
324 327
325 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { 328 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) {
326 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 329 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
327 } 330 }
328 331
329 } // namespace 332 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698