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

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

Issue 2877893002: Make UseCounter take a LocaFrame instead of any Frame (Closed)
Patch Set: Fix compile Created 3 years, 6 months 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class ChromeClient; 44 class ChromeClient;
45 class DOMWindow; 45 class DOMWindow;
46 class DOMWrapperWorld; 46 class DOMWrapperWorld;
47 class Document; 47 class Document;
48 class FrameClient; 48 class FrameClient;
49 class FrameOwner; 49 class FrameOwner;
50 class HTMLFrameOwnerElement; 50 class HTMLFrameOwnerElement;
51 class LayoutPart; 51 class LayoutPart;
52 class LayoutPartItem; 52 class LayoutPartItem;
53 class LocalFrame;
53 class KURL; 54 class KURL;
54 class Page; 55 class Page;
55 class SecurityContext; 56 class SecurityContext;
56 class Settings; 57 class Settings;
57 class WindowProxy; 58 class WindowProxy;
58 class WindowProxyManager; 59 class WindowProxyManager;
59 struct FrameLoadRequest; 60 struct FrameLoadRequest;
60 61
61 enum class FrameDetachType { kRemove, kSwap }; 62 enum class FrameDetachType { kRemove, kSwap };
62 63
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void SetOwner(FrameOwner* owner) { owner_ = owner; } 101 void SetOwner(FrameOwner* owner) { owner_ = owner; }
101 HTMLFrameOwnerElement* DeprecatedLocalOwner() const; 102 HTMLFrameOwnerElement* DeprecatedLocalOwner() const;
102 103
103 DOMWindow* DomWindow() const { return dom_window_; } 104 DOMWindow* DomWindow() const { return dom_window_; }
104 105
105 FrameTree& Tree() const; 106 FrameTree& Tree() const;
106 ChromeClient& GetChromeClient() const; 107 ChromeClient& GetChromeClient() const;
107 108
108 virtual SecurityContext* GetSecurityContext() const = 0; 109 virtual SecurityContext* GetSecurityContext() const = 0;
109 110
110 Frame* FindFrameForNavigation(const AtomicString& name, Frame& active_frame); 111 Frame* FindFrameForNavigation(const AtomicString& name,
112 LocalFrame& active_frame);
111 Frame* FindUnsafeParentScrollPropagationBoundary(); 113 Frame* FindUnsafeParentScrollPropagationBoundary();
112 114
113 // This prepares the Frame for the next commit. It will detach children, 115 // This prepares the Frame for the next commit. It will detach children,
114 // dispatch unload events, abort XHR requests and detach the document. 116 // dispatch unload events, abort XHR requests and detach the document.
115 // Returns true if the frame is ready to receive the next commit, or false 117 // Returns true if the frame is ready to receive the next commit, or false
116 // otherwise. 118 // otherwise.
117 virtual bool PrepareForCommit() = 0; 119 virtual bool PrepareForCommit() = 0;
118 120
119 // TODO(japhet): These should all move to LocalFrame. 121 // TODO(japhet): These should all move to LocalFrame.
120 bool CanNavigate(const Frame&);
121 virtual void PrintNavigationErrorMessage(const Frame&, 122 virtual void PrintNavigationErrorMessage(const Frame&,
122 const char* reason) = 0; 123 const char* reason) = 0;
123 virtual void PrintNavigationWarning(const String&) = 0; 124 virtual void PrintNavigationWarning(const String&) = 0;
124 125
125 // TODO(pilgrim): Replace all instances of ownerLayoutObject() with 126 // TODO(pilgrim): Replace all instances of ownerLayoutObject() with
126 // ownerLayoutItem(), https://crbug.com/499321 127 // ownerLayoutItem(), https://crbug.com/499321
127 LayoutPart* OwnerLayoutObject() 128 LayoutPart* OwnerLayoutObject()
128 const; // LayoutObject for the element that contains this frame. 129 const; // LayoutObject for the element that contains this frame.
129 LayoutPartItem OwnerLayoutItem() const; 130 LayoutPartItem OwnerLayoutItem() const;
130 131
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 163
163 Member<Page> page_; 164 Member<Page> page_;
164 Member<FrameOwner> owner_; 165 Member<FrameOwner> owner_;
165 Member<DOMWindow> dom_window_; 166 Member<DOMWindow> dom_window_;
166 167
167 bool has_received_user_gesture_ = false; 168 bool has_received_user_gesture_ = false;
168 169
169 FrameLifecycle lifecycle_; 170 FrameLifecycle lifecycle_;
170 171
171 private: 172 private:
172 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason);
173
174 Member<FrameClient> client_; 173 Member<FrameClient> client_;
175 const Member<WindowProxyManager> window_proxy_manager_; 174 const Member<WindowProxyManager> window_proxy_manager_;
176 // TODO(sashab): Investigate if this can be represented with m_lifecycle. 175 // TODO(sashab): Investigate if this can be represented with m_lifecycle.
177 bool is_loading_; 176 bool is_loading_;
178 }; 177 };
179 178
180 inline FrameClient* Frame::Client() const { 179 inline FrameClient* Frame::Client() const {
181 return client_; 180 return client_;
182 } 181 }
183 182
184 inline FrameOwner* Frame::Owner() const { 183 inline FrameOwner* Frame::Owner() const {
185 return owner_; 184 return owner_;
186 } 185 }
187 186
188 inline FrameTree& Frame::Tree() const { 187 inline FrameTree& Frame::Tree() const {
189 return tree_node_; 188 return tree_node_;
190 } 189 }
191 190
192 // Allow equality comparisons of Frames by reference or pointer, 191 // Allow equality comparisons of Frames by reference or pointer,
193 // interchangeably. 192 // interchangeably.
194 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) 193 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame)
195 194
196 } // namespace blink 195 } // namespace blink
197 196
198 #endif // Frame_h 197 #endif // Frame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698