| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 UserGestureStatus) = 0; | 82 UserGestureStatus) = 0; |
| 83 // This version of Frame::navigate assumes the resulting navigation is not | 83 // This version of Frame::navigate assumes the resulting navigation is not |
| 84 // to be started on a timer. Use the method above in such cases. | 84 // to be started on a timer. Use the method above in such cases. |
| 85 virtual void navigate(const FrameLoadRequest&) = 0; | 85 virtual void navigate(const FrameLoadRequest&) = 0; |
| 86 virtual void reload(FrameLoadType, ClientRedirectPolicy) = 0; | 86 virtual void reload(FrameLoadType, ClientRedirectPolicy) = 0; |
| 87 | 87 |
| 88 virtual void detach(FrameDetachType); | 88 virtual void detach(FrameDetachType); |
| 89 void disconnectOwnerElement(); | 89 void disconnectOwnerElement(); |
| 90 virtual bool shouldClose() = 0; | 90 virtual bool shouldClose() = 0; |
| 91 | 91 |
| 92 virtual void setDocumentHasReceivedUserGesture() = 0; | |
| 93 | |
| 94 FrameClient* client() const; | 92 FrameClient* client() const; |
| 95 | 93 |
| 96 // NOTE: Page is moving out of Blink up into the browser process as | 94 // NOTE: Page is moving out of Blink up into the browser process as |
| 97 // part of the site-isolation (out of process iframes) work. | 95 // part of the site-isolation (out of process iframes) work. |
| 98 // FrameHost should be used instead where possible. | 96 // FrameHost should be used instead where possible. |
| 99 Page* page() const; | 97 Page* page() const; |
| 100 FrameHost* host() const; // Null when the frame is detached. | 98 FrameHost* host() const; // Null when the frame is detached. |
| 101 | 99 |
| 102 bool isMainFrame() const; | 100 bool isMainFrame() const; |
| 103 bool isLocalRoot() const; | 101 bool isLocalRoot() const; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // In the case of LocalFrames, it means that the frame has sent a | 138 // In the case of LocalFrames, it means that the frame has sent a |
| 141 // didStartLoading() callback, but not the matching didStopLoading(). Inside | 139 // didStartLoading() callback, but not the matching didStopLoading(). Inside |
| 142 // blink, you probably want Document::loadEventFinished() instead. | 140 // blink, you probably want Document::loadEventFinished() instead. |
| 143 void setIsLoading(bool isLoading) { m_isLoading = isLoading; } | 141 void setIsLoading(bool isLoading) { m_isLoading = isLoading; } |
| 144 bool isLoading() const { return m_isLoading; } | 142 bool isLoading() const { return m_isLoading; } |
| 145 | 143 |
| 146 virtual WindowProxyManagerBase* getWindowProxyManager() const = 0; | 144 virtual WindowProxyManagerBase* getWindowProxyManager() const = 0; |
| 147 | 145 |
| 148 virtual void didChangeVisibilityState(); | 146 virtual void didChangeVisibilityState(); |
| 149 | 147 |
| 148 void setDocumentHasReceivedUserGesture(); |
| 149 bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; } |
| 150 |
| 150 bool isDetaching() const { return m_isDetaching; } | 151 bool isDetaching() const { return m_isDetaching; } |
| 151 | 152 |
| 152 protected: | 153 protected: |
| 153 Frame(FrameClient*, FrameHost*, FrameOwner*); | 154 Frame(FrameClient*, FrameHost*, FrameOwner*); |
| 154 | 155 |
| 155 mutable FrameTree m_treeNode; | 156 mutable FrameTree m_treeNode; |
| 156 | 157 |
| 157 Member<FrameHost> m_host; | 158 Member<FrameHost> m_host; |
| 158 Member<FrameOwner> m_owner; | 159 Member<FrameOwner> m_owner; |
| 159 Member<DOMWindow> m_domWindow; | 160 Member<DOMWindow> m_domWindow; |
| 160 | 161 |
| 162 bool m_hasReceivedUserGesture = false; |
| 161 bool m_isDetaching = false; | 163 bool m_isDetaching = false; |
| 162 | 164 |
| 163 private: | 165 private: |
| 164 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); | 166 bool canNavigateWithoutFramebusting(const Frame&, String& errorReason); |
| 165 | 167 |
| 166 Member<FrameClient> m_client; | 168 Member<FrameClient> m_client; |
| 167 bool m_isLoading; | 169 bool m_isLoading; |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 inline FrameClient* Frame::client() const { | 172 inline FrameClient* Frame::client() const { |
| 171 return m_client; | 173 return m_client; |
| 172 } | 174 } |
| 173 | 175 |
| 174 inline FrameOwner* Frame::owner() const { | 176 inline FrameOwner* Frame::owner() const { |
| 175 return m_owner; | 177 return m_owner; |
| 176 } | 178 } |
| 177 | 179 |
| 178 inline FrameTree& Frame::tree() const { | 180 inline FrameTree& Frame::tree() const { |
| 179 return m_treeNode; | 181 return m_treeNode; |
| 180 } | 182 } |
| 181 | 183 |
| 182 // Allow equality comparisons of Frames by reference or pointer, | 184 // Allow equality comparisons of Frames by reference or pointer, |
| 183 // interchangeably. | 185 // interchangeably. |
| 184 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) | 186 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) |
| 185 | 187 |
| 186 } // namespace blink | 188 } // namespace blink |
| 187 | 189 |
| 188 #endif // Frame_h | 190 #endif // Frame_h |
| OLD | NEW |