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

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: Rebase Created 5 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 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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 } 1979 }
1980 1980
1981 void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) { 1981 void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) {
1982 DCHECK(!frame_ || frame_ == frame); 1982 DCHECK(!frame_ || frame_ == frame);
1983 // Notify the browser process that it is no longer safe to show the pending 1983 // Notify the browser process that it is no longer safe to show the pending
1984 // URL of the main frame, since a URL spoof is now possible. 1984 // URL of the main frame, since a URL spoof is now possible.
1985 if (!frame->parent() && render_view_->page_id_ == -1) 1985 if (!frame->parent() && render_view_->page_id_ == -1)
1986 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_)); 1986 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_));
1987 } 1987 }
1988 1988
1989 // TODO(alexmos): Remove once Blink is updated to use the version that takes
1990 // sandbox flags.
1991 blink::WebFrame* RenderFrameImpl::createChildFrame(
1992 blink::WebLocalFrame* parent,
1993 const blink::WebString& name) {
1994 return createChildFrame(parent, name, blink::WebSandboxFlags::None);
1995 }
1996
1997 blink::WebFrame* RenderFrameImpl::createChildFrame( 1989 blink::WebFrame* RenderFrameImpl::createChildFrame(
1998 blink::WebLocalFrame* parent, 1990 blink::WebLocalFrame* parent,
1999 const blink::WebString& name, 1991 const blink::WebString& name,
2000 blink::WebSandboxFlags sandbox_flags) { 1992 blink::WebSandboxFlags sandbox_flags) {
2001 // Synchronously notify the browser of a child frame creation to get the 1993 // Synchronously notify the browser of a child frame creation to get the
2002 // routing_id for the RenderFrame. 1994 // routing_id for the RenderFrame.
2003 int child_routing_id = MSG_ROUTING_NONE; 1995 int child_routing_id = MSG_ROUTING_NONE;
2004 CHECK(Send(new FrameHostMsg_CreateChildFrame( 1996 CHECK(Send(new FrameHostMsg_CreateChildFrame(
2005 routing_id_, 1997 routing_id_,
2006 base::UTF16ToUTF8(name), 1998 base::UTF16ToUTF8(name),
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
4391 4383
4392 #if defined(ENABLE_BROWSER_CDMS) 4384 #if defined(ENABLE_BROWSER_CDMS)
4393 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4385 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4394 if (!cdm_manager_) 4386 if (!cdm_manager_)
4395 cdm_manager_ = new RendererCdmManager(this); 4387 cdm_manager_ = new RendererCdmManager(this);
4396 return cdm_manager_; 4388 return cdm_manager_;
4397 } 4389 }
4398 #endif // defined(ENABLE_BROWSER_CDMS) 4390 #endif // defined(ENABLE_BROWSER_CDMS)
4399 4391
4400 } // namespace content 4392 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698