Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: third_party/WebKit/Source/core/frame/Frame.h

Issue 2481653002: Move FeaturePolicy object to SecurityContext (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
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/feature_policy/FeaturePolicy.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 39
40 #include <memory>
41
42 namespace blink { 40 namespace blink {
43 41
44 class ChromeClient; 42 class ChromeClient;
45 class DOMWindow; 43 class DOMWindow;
46 class DOMWrapperWorld; 44 class DOMWrapperWorld;
47 class Document; 45 class Document;
48 class FrameClient; 46 class FrameClient;
49 class FrameHost; 47 class FrameHost;
50 class FrameOwner; 48 class FrameOwner;
51 class HTMLFrameOwnerElement; 49 class HTMLFrameOwnerElement;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 105
108 FrameOwner* owner() const; 106 FrameOwner* owner() const;
109 void setOwner(FrameOwner* owner) { m_owner = owner; } 107 void setOwner(FrameOwner* owner) { m_owner = owner; }
110 HTMLFrameOwnerElement* deprecatedLocalOwner() const; 108 HTMLFrameOwnerElement* deprecatedLocalOwner() const;
111 109
112 FrameTree& tree() const; 110 FrameTree& tree() const;
113 ChromeClient& chromeClient() const; 111 ChromeClient& chromeClient() const;
114 112
115 virtual SecurityContext* securityContext() const = 0; 113 virtual SecurityContext* securityContext() const = 0;
116 114
117 FeaturePolicy* getFeaturePolicy() const { return m_featurePolicy.get(); }
118 void setFeaturePolicy(std::unique_ptr<FeaturePolicy> newPolicy) {
119 m_featurePolicy = std::move(newPolicy);
120 }
121
122 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); 115 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame);
123 Frame* findUnsafeParentScrollPropagationBoundary(); 116 Frame* findUnsafeParentScrollPropagationBoundary();
124 117
125 // This prepares the Frame for the next commit. It will detach children, 118 // This prepares the Frame for the next commit. It will detach children,
126 // dispatch unload events, abort XHR requests and detach the document. 119 // dispatch unload events, abort XHR requests and detach the document.
127 // Returns true if the frame is ready to receive the next commit, or false 120 // Returns true if the frame is ready to receive the next commit, or false
128 // otherwise. 121 // otherwise.
129 virtual bool prepareForCommit() = 0; 122 virtual bool prepareForCommit() = 0;
130 123
131 bool canNavigate(const Frame&); 124 bool canNavigate(const Frame&);
(...skipping 29 matching lines...) Expand all
161 Member<FrameHost> m_host; 154 Member<FrameHost> m_host;
162 Member<FrameOwner> m_owner; 155 Member<FrameOwner> m_owner;
163 156
164 bool m_isDetaching = false; 157 bool m_isDetaching = false;
165 158
166 private: 159 private:
167 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); 160 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason);
168 161
169 Member<FrameClient> m_client; 162 Member<FrameClient> m_client;
170 bool m_isLoading; 163 bool m_isLoading;
171
172 std::unique_ptr<FeaturePolicy> m_featurePolicy;
173 }; 164 };
174 165
175 inline FrameClient* Frame::client() const { 166 inline FrameClient* Frame::client() const {
176 return m_client; 167 return m_client;
177 } 168 }
178 169
179 inline FrameOwner* Frame::owner() const { 170 inline FrameOwner* Frame::owner() const {
180 return m_owner; 171 return m_owner;
181 } 172 }
182 173
183 inline FrameTree& Frame::tree() const { 174 inline FrameTree& Frame::tree() const {
184 return m_treeNode; 175 return m_treeNode;
185 } 176 }
186 177
187 // Allow equality comparisons of Frames by reference or pointer, 178 // Allow equality comparisons of Frames by reference or pointer,
188 // interchangeably. 179 // interchangeably.
189 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) 180 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame)
190 181
191 } // namespace blink 182 } // namespace blink
192 183
193 #endif // Frame_h 184 #endif // Frame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/SecurityContext.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698