| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags) { | 130 void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags) { |
| 131 // At the moment, this is only used to replicate sandbox flags | 131 // At the moment, this is only used to replicate sandbox flags |
| 132 // for frames with a remote owner. | 132 // for frames with a remote owner. |
| 133 FrameOwner* owner = toImplBase()->frame()->owner(); | 133 FrameOwner* owner = toImplBase()->frame()->owner(); |
| 134 DCHECK(owner); | 134 DCHECK(owner); |
| 135 toRemoteFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags)); | 135 toRemoteFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void WebFrame::setFrameOwnerContainerPolicy( |
| 139 const blink::WebParsedFeaturePolicy& containerPolicy) { |
| 140 // At the moment, this is only used to replicate the container policy for |
| 141 // frames with a remote owner. |
| 142 FrameOwner* owner = toImplBase()->frame()->owner(); |
| 143 DCHECK(owner); |
| 144 toRemoteFrameOwner(owner)->setContainerPolicy(containerPolicy); |
| 145 } |
| 146 |
| 138 WebInsecureRequestPolicy WebFrame::getInsecureRequestPolicy() const { | 147 WebInsecureRequestPolicy WebFrame::getInsecureRequestPolicy() const { |
| 139 return toImplBase()->frame()->securityContext()->getInsecureRequestPolicy(); | 148 return toImplBase()->frame()->securityContext()->getInsecureRequestPolicy(); |
| 140 } | 149 } |
| 141 | 150 |
| 142 void WebFrame::setFrameOwnerProperties( | 151 void WebFrame::setFrameOwnerProperties( |
| 143 const WebFrameOwnerProperties& properties) { | 152 const WebFrameOwnerProperties& properties) { |
| 144 // At the moment, this is only used to replicate frame owner properties | 153 // At the moment, this is only used to replicate frame owner properties |
| 145 // for frames with a remote owner. | 154 // for frames with a remote owner. |
| 146 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner()); | 155 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner()); |
| 147 DCHECK(owner); | 156 DCHECK(owner); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 for (WebFrame* child = frame->firstChild(); child; | 321 for (WebFrame* child = frame->firstChild(); child; |
| 313 child = child->nextSibling()) | 322 child = child->nextSibling()) |
| 314 traceFrame(visitor, child); | 323 traceFrame(visitor, child); |
| 315 } | 324 } |
| 316 | 325 |
| 317 void WebFrame::close() { | 326 void WebFrame::close() { |
| 318 m_openedFrameTracker->dispose(); | 327 m_openedFrameTracker->dispose(); |
| 319 } | 328 } |
| 320 | 329 |
| 321 } // namespace blink | 330 } // namespace blink |
| OLD | NEW |