| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999-2001 Lars Knoll <knoll@kde.org> | 3 * 1999-2001 Lars Knoll <knoll@kde.org> |
| 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> | 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> | 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000-2001 Dirk Mueller <mueller@kde.org> | 6 * 2000-2001 Dirk Mueller <mueller@kde.org> |
| 7 * 2000 Stefan Schimanski <1Stein@gmx.de> | 7 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 9 * reserved. | 9 * reserved. |
| 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * Boston, MA 02110-1301, USA. | 26 * Boston, MA 02110-1301, USA. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef Frame_h | 29 #ifndef Frame_h |
| 30 #define Frame_h | 30 #define Frame_h |
| 31 | 31 |
| 32 #include "core/CoreExport.h" | 32 #include "core/CoreExport.h" |
| 33 #include "core/frame/FrameTypes.h" | 33 #include "core/frame/FrameTypes.h" |
| 34 #include "core/loader/FrameLoaderTypes.h" | 34 #include "core/loader/FrameLoaderTypes.h" |
| 35 #include "core/page/FrameTree.h" | 35 #include "core/page/FrameTree.h" |
| 36 #include "platform/feature_policy/FeaturePolicy.h" |
| 36 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 37 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
| 38 | 39 |
| 40 #include <memory> |
| 41 |
| 39 namespace blink { | 42 namespace blink { |
| 40 | 43 |
| 41 class ChromeClient; | 44 class ChromeClient; |
| 42 class DOMWindow; | 45 class DOMWindow; |
| 43 class DOMWrapperWorld; | 46 class DOMWrapperWorld; |
| 44 class Document; | 47 class Document; |
| 45 class FrameClient; | 48 class FrameClient; |
| 46 class FrameHost; | 49 class FrameHost; |
| 47 class FrameOwner; | 50 class FrameOwner; |
| 48 class HTMLFrameOwnerElement; | 51 class HTMLFrameOwnerElement; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 105 |
| 103 FrameOwner* owner() const; | 106 FrameOwner* owner() const; |
| 104 void setOwner(FrameOwner* owner) { m_owner = owner; } | 107 void setOwner(FrameOwner* owner) { m_owner = owner; } |
| 105 HTMLFrameOwnerElement* deprecatedLocalOwner() const; | 108 HTMLFrameOwnerElement* deprecatedLocalOwner() const; |
| 106 | 109 |
| 107 FrameTree& tree() const; | 110 FrameTree& tree() const; |
| 108 ChromeClient& chromeClient() const; | 111 ChromeClient& chromeClient() const; |
| 109 | 112 |
| 110 virtual SecurityContext* securityContext() const = 0; | 113 virtual SecurityContext* securityContext() const = 0; |
| 111 | 114 |
| 115 FeaturePolicy* getFeaturePolicy() const { return m_featurePolicy.get(); } |
| 116 void setFeaturePolicy(FeaturePolicy* newPolicy) { |
| 117 m_featurePolicy.reset(newPolicy); |
| 118 } |
| 119 |
| 112 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); | 120 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); |
| 113 Frame* findUnsafeParentScrollPropagationBoundary(); | 121 Frame* findUnsafeParentScrollPropagationBoundary(); |
| 114 | 122 |
| 115 // This prepares the Frame for the next commit. It will detach children, | 123 // This prepares the Frame for the next commit. It will detach children, |
| 116 // dispatch unload events, abort XHR requests and detach the document. | 124 // dispatch unload events, abort XHR requests and detach the document. |
| 117 // Returns true if the frame is ready to receive the next commit, or false | 125 // Returns true if the frame is ready to receive the next commit, or false |
| 118 // otherwise. | 126 // otherwise. |
| 119 virtual bool prepareForCommit() = 0; | 127 virtual bool prepareForCommit() = 0; |
| 120 | 128 |
| 121 bool canNavigate(const Frame&); | 129 bool canNavigate(const Frame&); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 151 Member<FrameHost> m_host; | 159 Member<FrameHost> m_host; |
| 152 Member<FrameOwner> m_owner; | 160 Member<FrameOwner> m_owner; |
| 153 | 161 |
| 154 bool m_isDetaching = false; | 162 bool m_isDetaching = false; |
| 155 | 163 |
| 156 private: | 164 private: |
| 157 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); | 165 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); |
| 158 | 166 |
| 159 Member<FrameClient> m_client; | 167 Member<FrameClient> m_client; |
| 160 bool m_isLoading; | 168 bool m_isLoading; |
| 169 |
| 170 std::unique_ptr<FeaturePolicy> m_featurePolicy; |
| 161 }; | 171 }; |
| 162 | 172 |
| 163 inline FrameClient* Frame::client() const { | 173 inline FrameClient* Frame::client() const { |
| 164 return m_client; | 174 return m_client; |
| 165 } | 175 } |
| 166 | 176 |
| 167 inline FrameOwner* Frame::owner() const { | 177 inline FrameOwner* Frame::owner() const { |
| 168 return m_owner; | 178 return m_owner; |
| 169 } | 179 } |
| 170 | 180 |
| 171 inline FrameTree& Frame::tree() const { | 181 inline FrameTree& Frame::tree() const { |
| 172 return m_treeNode; | 182 return m_treeNode; |
| 173 } | 183 } |
| 174 | 184 |
| 175 // Allow equality comparisons of Frames by reference or pointer, | 185 // Allow equality comparisons of Frames by reference or pointer, |
| 176 // interchangeably. | 186 // interchangeably. |
| 177 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) | 187 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) |
| 178 | 188 |
| 179 } // namespace blink | 189 } // namespace blink |
| 180 | 190 |
| 181 #endif // Frame_h | 191 #endif // Frame_h |
| OLD | NEW |