| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void FrameOwnerPropertiesChanged(); | 119 void FrameOwnerPropertiesChanged(); |
| 120 | 120 |
| 121 // Return the origin which is to be used for feature policy container | 121 // Return the origin which is to be used for feature policy container |
| 122 // policies, as "the origin of the URL in the frame's src attribute" (see | 122 // policies, as "the origin of the URL in the frame's src attribute" (see |
| 123 // https://wicg.github.io/feature-policy/#iframe-allow-attribute). | 123 // https://wicg.github.io/feature-policy/#iframe-allow-attribute). |
| 124 // This method is intended to be overridden by specific frame classes. | 124 // This method is intended to be overridden by specific frame classes. |
| 125 virtual RefPtr<SecurityOrigin> GetOriginForFeaturePolicy() const { | 125 virtual RefPtr<SecurityOrigin> GetOriginForFeaturePolicy() const { |
| 126 return SecurityOrigin::CreateUnique(); | 126 return SecurityOrigin::CreateUnique(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // Construct a new feature policy container policy for this frame, based on | 129 // Return a feature policy container policy for this frame, based on the |
| 130 // the frame attributes and the effective origin specified in the frame | 130 // frame attributes and the effective origin specified in the frame |
| 131 // attributes. | 131 // attributes. The base implementation here uses the "allow" attribute, but |
| 132 // additional attributes and or restrictions may be introduced by specific |
| 133 // frame classses. |
| 134 virtual Vector<WebParsedFeaturePolicyDeclaration> ConstructContainerPolicy() |
| 135 const; |
| 136 |
| 137 // Update the container policy and notify the frame loader client of any |
| 138 // changes. |
| 132 void UpdateContainerPolicy(); | 139 void UpdateContainerPolicy(); |
| 133 | 140 |
| 134 private: | 141 private: |
| 135 // Intentionally private to prevent redundant checks when the type is | 142 // Intentionally private to prevent redundant checks when the type is |
| 136 // already HTMLFrameOwnerElement. | 143 // already HTMLFrameOwnerElement. |
| 137 bool IsLocal() const final { return true; } | 144 bool IsLocal() const final { return true; } |
| 138 bool IsRemote() const final { return false; } | 145 bool IsRemote() const final { return false; } |
| 139 | 146 |
| 140 bool IsFrameOwnerElement() const final { return true; } | 147 bool IsFrameOwnerElement() const final { return true; } |
| 141 | 148 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 199 |
| 193 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, | 200 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, |
| 194 FrameOwner, | 201 FrameOwner, |
| 195 owner, | 202 owner, |
| 196 owner->IsLocal(), | 203 owner->IsLocal(), |
| 197 owner.IsLocal()); | 204 owner.IsLocal()); |
| 198 | 205 |
| 199 } // namespace blink | 206 } // namespace blink |
| 200 | 207 |
| 201 #endif // HTMLFrameOwnerElement_h | 208 #endif // HTMLFrameOwnerElement_h |
| OLD | NEW |