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

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

Issue 797813006: Replicate sandbox flags for OOPIF (Chromium part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iframe-sandbox-flags-part1
Patch Set: Fix issue in previous rebase 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 | « content/renderer/render_frame_impl.h ('k') | content/test/data/sandboxed_frames.html » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 } 1998 }
1999 1999
2000 void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) { 2000 void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) {
2001 DCHECK(!frame_ || frame_ == frame); 2001 DCHECK(!frame_ || frame_ == frame);
2002 // Notify the browser process that it is no longer safe to show the pending 2002 // Notify the browser process that it is no longer safe to show the pending
2003 // URL of the main frame, since a URL spoof is now possible. 2003 // URL of the main frame, since a URL spoof is now possible.
2004 if (!frame->parent() && render_view_->page_id_ == -1) 2004 if (!frame->parent() && render_view_->page_id_ == -1)
2005 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_)); 2005 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_));
2006 } 2006 }
2007 2007
2008 // TODO(alexmos): Remove once Blink is updated to use the version that takes
2009 // sandbox flags.
2010 blink::WebFrame* RenderFrameImpl::createChildFrame(
2011 blink::WebLocalFrame* parent,
2012 const blink::WebString& name) {
2013 return createChildFrame(parent, name, blink::WebSandboxFlags::None);
2014 }
2015
2016 blink::WebFrame* RenderFrameImpl::createChildFrame( 2008 blink::WebFrame* RenderFrameImpl::createChildFrame(
2017 blink::WebLocalFrame* parent, 2009 blink::WebLocalFrame* parent,
2018 const blink::WebString& name, 2010 const blink::WebString& name,
2019 blink::WebSandboxFlags sandbox_flags) { 2011 blink::WebSandboxFlags sandbox_flags) {
2020 // Synchronously notify the browser of a child frame creation to get the 2012 // Synchronously notify the browser of a child frame creation to get the
2021 // routing_id for the RenderFrame. 2013 // routing_id for the RenderFrame.
2022 int child_routing_id = MSG_ROUTING_NONE; 2014 int child_routing_id = MSG_ROUTING_NONE;
2023 CHECK(Send(new FrameHostMsg_CreateChildFrame( 2015 CHECK(Send(new FrameHostMsg_CreateChildFrame(
2024 routing_id_, 2016 routing_id_,
2025 base::UTF16ToUTF8(name), 2017 base::UTF16ToUTF8(name),
(...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after
4415 4407
4416 #if defined(ENABLE_BROWSER_CDMS) 4408 #if defined(ENABLE_BROWSER_CDMS)
4417 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4409 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4418 if (!cdm_manager_) 4410 if (!cdm_manager_)
4419 cdm_manager_ = new RendererCdmManager(this); 4411 cdm_manager_ = new RendererCdmManager(this);
4420 return cdm_manager_; 4412 return cdm_manager_;
4421 } 4413 }
4422 #endif // defined(ENABLE_BROWSER_CDMS) 4414 #endif // defined(ENABLE_BROWSER_CDMS)
4423 4415
4424 } // namespace content 4416 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/test/data/sandboxed_frames.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698