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 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 class ChromeClient; | 42 class ChromeClient; |
42 class DOMWindow; | 43 class DOMWindow; |
43 class DOMWrapperWorld; | 44 class DOMWrapperWorld; |
44 class Document; | 45 class Document; |
45 class FrameClient; | 46 class FrameClient; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 | 103 |
103 FrameOwner* owner() const; | 104 FrameOwner* owner() const; |
104 void setOwner(FrameOwner* owner) { m_owner = owner; } | 105 void setOwner(FrameOwner* owner) { m_owner = owner; } |
105 HTMLFrameOwnerElement* deprecatedLocalOwner() const; | 106 HTMLFrameOwnerElement* deprecatedLocalOwner() const; |
106 | 107 |
107 FrameTree& tree() const; | 108 FrameTree& tree() const; |
108 ChromeClient& chromeClient() const; | 109 ChromeClient& chromeClient() const; |
109 | 110 |
110 virtual SecurityContext* securityContext() const = 0; | 111 virtual SecurityContext* securityContext() const = 0; |
111 | 112 |
113 FeaturePolicy* getFeaturePolicy() const { return m_featurePolicy; } | |
114 void setFeaturePolicy(FeaturePolicy* newPolicy) { | |
dcheng
2016/10/20 17:41:44
For replicating this so it'll work for OOPIF, look
| |
115 m_featurePolicy = newPolicy; | |
116 } | |
117 | |
112 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); | 118 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); |
113 Frame* findUnsafeParentScrollPropagationBoundary(); | 119 Frame* findUnsafeParentScrollPropagationBoundary(); |
114 | 120 |
115 // This prepares the Frame for the next commit. It will detach children, | 121 // This prepares the Frame for the next commit. It will detach children, |
116 // dispatch unload events, abort XHR requests and detach the document. | 122 // 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 | 123 // Returns true if the frame is ready to receive the next commit, or false |
118 // otherwise. | 124 // otherwise. |
119 virtual bool prepareForCommit() = 0; | 125 virtual bool prepareForCommit() = 0; |
120 | 126 |
121 bool canNavigate(const Frame&); | 127 bool canNavigate(const Frame&); |
(...skipping 25 matching lines...) Expand all Loading... | |
147 mutable FrameTree m_treeNode; | 153 mutable FrameTree m_treeNode; |
148 | 154 |
149 Member<FrameHost> m_host; | 155 Member<FrameHost> m_host; |
150 Member<FrameOwner> m_owner; | 156 Member<FrameOwner> m_owner; |
151 | 157 |
152 private: | 158 private: |
153 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); | 159 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); |
154 | 160 |
155 Member<FrameClient> m_client; | 161 Member<FrameClient> m_client; |
156 bool m_isLoading; | 162 bool m_isLoading; |
163 | |
164 Member<FeaturePolicy> m_featurePolicy; | |
157 }; | 165 }; |
158 | 166 |
159 inline FrameClient* Frame::client() const { | 167 inline FrameClient* Frame::client() const { |
160 return m_client; | 168 return m_client; |
161 } | 169 } |
162 | 170 |
163 inline FrameOwner* Frame::owner() const { | 171 inline FrameOwner* Frame::owner() const { |
164 return m_owner; | 172 return m_owner; |
165 } | 173 } |
166 | 174 |
167 inline FrameTree& Frame::tree() const { | 175 inline FrameTree& Frame::tree() const { |
168 return m_treeNode; | 176 return m_treeNode; |
169 } | 177 } |
170 | 178 |
171 // Allow equality comparisons of Frames by reference or pointer, | 179 // Allow equality comparisons of Frames by reference or pointer, |
172 // interchangeably. | 180 // interchangeably. |
173 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) | 181 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) |
174 | 182 |
175 } // namespace blink | 183 } // namespace blink |
176 | 184 |
177 #endif // Frame_h | 185 #endif // Frame_h |
OLD | NEW |