OLD | NEW |
---|---|
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 "public/web/WebFrame.h" | 5 #include "public/web/WebFrame.h" |
6 | 6 |
7 #include "bindings/core/v8/WindowProxyManager.h" | 7 #include "bindings/core/v8/WindowProxyManager.h" |
8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 | 120 |
121 void WebFrame::Detach() { | 121 void WebFrame::Detach() { |
122 ToImplBase()->GetFrame()->Detach(FrameDetachType::kRemove); | 122 ToImplBase()->GetFrame()->Detach(FrameDetachType::kRemove); |
123 } | 123 } |
124 | 124 |
125 WebSecurityOrigin WebFrame::GetSecurityOrigin() const { | 125 WebSecurityOrigin WebFrame::GetSecurityOrigin() const { |
126 return WebSecurityOrigin( | 126 return WebSecurityOrigin( |
127 ToImplBase()->GetFrame()->GetSecurityContext()->GetSecurityOrigin()); | 127 ToImplBase()->GetFrame()->GetSecurityContext()->GetSecurityOrigin()); |
128 } | 128 } |
129 | 129 |
130 void WebFrame::SetFrameOwnerSandboxFlags(WebSandboxFlags flags) { | 130 void WebFrame::SetFrameOwnerPolicy( |
131 // At the moment, this is only used to replicate sandbox flags | 131 WebSandboxFlags flags, |
132 // for frames with a remote owner. | 132 const blink::WebParsedFeaturePolicy& container_policy) { |
133 // At the moment, this is only used to replicate sandbox flags and container | |
134 // policy for frames with a remote owner. | |
133 FrameOwner* owner = ToImplBase()->GetFrame()->Owner(); | 135 FrameOwner* owner = ToImplBase()->GetFrame()->Owner(); |
134 DCHECK(owner); | 136 DCHECK(owner); |
135 ToRemoteFrameOwner(owner)->SetSandboxFlags(static_cast<SandboxFlags>(flags)); | 137 RemoteFrameOwner* remoteOwner = ToRemoteFrameOwner(owner); |
dcheng
2017/04/18 16:26:37
Nit: remote_owner
Or maybe just merge this into l
iclelland
2017/04/18 19:19:44
Whoops. (Didn't use the rebase-helper tool on this
| |
138 remoteOwner->SetSandboxFlags(static_cast<SandboxFlags>(flags)); | |
139 remoteOwner->SetContainerPolicy(container_policy); | |
136 } | 140 } |
137 | 141 |
138 WebInsecureRequestPolicy WebFrame::GetInsecureRequestPolicy() const { | 142 WebInsecureRequestPolicy WebFrame::GetInsecureRequestPolicy() const { |
139 return ToImplBase() | 143 return ToImplBase() |
140 ->GetFrame() | 144 ->GetFrame() |
141 ->GetSecurityContext() | 145 ->GetSecurityContext() |
142 ->GetInsecureRequestPolicy(); | 146 ->GetInsecureRequestPolicy(); |
143 } | 147 } |
144 | 148 |
145 void WebFrame::SetFrameOwnerProperties( | 149 void WebFrame::SetFrameOwnerProperties( |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 for (WebFrame* child = frame->FirstChild(); child; | 320 for (WebFrame* child = frame->FirstChild(); child; |
317 child = child->NextSibling()) | 321 child = child->NextSibling()) |
318 TraceFrame(visitor, child); | 322 TraceFrame(visitor, child); |
319 } | 323 } |
320 | 324 |
321 void WebFrame::Close() { | 325 void WebFrame::Close() { |
322 opened_frame_tracker_->Dispose(); | 326 opened_frame_tracker_->Dispose(); |
323 } | 327 } |
324 | 328 |
325 } // namespace blink | 329 } // namespace blink |
OLD | NEW |