| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 FrameClient* Client() const; | 92 FrameClient* Client() const; |
| 93 | 93 |
| 94 Page* GetPage() const; // Null when the frame is detached. | 94 Page* GetPage() const; // Null when the frame is detached. |
| 95 virtual FrameView* View() const = 0; | 95 virtual FrameView* View() const = 0; |
| 96 | 96 |
| 97 bool IsMainFrame() const; | 97 bool IsMainFrame() const; |
| 98 bool IsLocalRoot() const; | 98 bool IsLocalRoot() const; |
| 99 | 99 |
| 100 FrameOwner* Owner() const; | 100 FrameOwner* Owner() const; |
| 101 void SetOwner(FrameOwner* owner) { owner_ = owner; } | 101 void SetOwner(FrameOwner*); |
| 102 HTMLFrameOwnerElement* DeprecatedLocalOwner() const; | 102 HTMLFrameOwnerElement* DeprecatedLocalOwner() const; |
| 103 | 103 |
| 104 DOMWindow* DomWindow() const { return dom_window_; } | 104 DOMWindow* DomWindow() const { return dom_window_; } |
| 105 | 105 |
| 106 FrameTree& Tree() const; | 106 FrameTree& Tree() const; |
| 107 ChromeClient& GetChromeClient() const; | 107 ChromeClient& GetChromeClient() const; |
| 108 | 108 |
| 109 virtual SecurityContext* GetSecurityContext() const = 0; | 109 virtual SecurityContext* GetSecurityContext() const = 0; |
| 110 | 110 |
| 111 Frame* FindUnsafeParentScrollPropagationBoundary(); | 111 Frame* FindUnsafeParentScrollPropagationBoundary(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 bool HasReceivedUserGesture() const { return has_received_user_gesture_; } | 147 bool HasReceivedUserGesture() const { return has_received_user_gesture_; } |
| 148 | 148 |
| 149 bool IsAttached() const { | 149 bool IsAttached() const { |
| 150 return lifecycle_.GetState() == FrameLifecycle::kAttached; | 150 return lifecycle_.GetState() == FrameLifecycle::kAttached; |
| 151 } | 151 } |
| 152 | 152 |
| 153 // Tests whether the feature-policy controlled feature is enabled by policy in | 153 // Tests whether the feature-policy controlled feature is enabled by policy in |
| 154 // the given frame. | 154 // the given frame. |
| 155 bool IsFeatureEnabled(WebFeaturePolicyFeature) const; | 155 bool IsFeatureEnabled(WebFeaturePolicyFeature) const; |
| 156 | 156 |
| 157 // Called to make a frame inert or non-inert. A frame is inert when there |
| 158 // is a modal dialog displayed within an ancestor frame, and this frame |
| 159 // itself is not within the dialog. |
| 160 virtual void SetIsInert(bool) = 0; |
| 161 void UpdateInertIfPossible(); |
| 162 |
| 157 protected: | 163 protected: |
| 158 Frame(FrameClient*, Page&, FrameOwner*, WindowProxyManager*); | 164 Frame(FrameClient*, Page&, FrameOwner*, WindowProxyManager*); |
| 159 | 165 |
| 160 mutable FrameTree tree_node_; | 166 mutable FrameTree tree_node_; |
| 161 | 167 |
| 162 Member<Page> page_; | 168 Member<Page> page_; |
| 163 Member<FrameOwner> owner_; | 169 Member<FrameOwner> owner_; |
| 164 Member<DOMWindow> dom_window_; | 170 Member<DOMWindow> dom_window_; |
| 165 | 171 |
| 166 bool has_received_user_gesture_ = false; | 172 bool has_received_user_gesture_ = false; |
| 167 | 173 |
| 168 FrameLifecycle lifecycle_; | 174 FrameLifecycle lifecycle_; |
| 169 | 175 |
| 176 // This is set to true if this is a subframe, and the frame element in the |
| 177 // parent frame's document becomes inert. This should always be false for |
| 178 // the main frame. |
| 179 bool is_inert_ = false; |
| 180 |
| 170 private: | 181 private: |
| 171 Member<FrameClient> client_; | 182 Member<FrameClient> client_; |
| 172 const Member<WindowProxyManager> window_proxy_manager_; | 183 const Member<WindowProxyManager> window_proxy_manager_; |
| 173 // TODO(sashab): Investigate if this can be represented with m_lifecycle. | 184 // TODO(sashab): Investigate if this can be represented with m_lifecycle. |
| 174 bool is_loading_; | 185 bool is_loading_; |
| 175 }; | 186 }; |
| 176 | 187 |
| 177 inline FrameClient* Frame::Client() const { | 188 inline FrameClient* Frame::Client() const { |
| 178 return client_; | 189 return client_; |
| 179 } | 190 } |
| 180 | 191 |
| 181 inline FrameOwner* Frame::Owner() const { | 192 inline FrameOwner* Frame::Owner() const { |
| 182 return owner_; | 193 return owner_; |
| 183 } | 194 } |
| 184 | 195 |
| 185 inline FrameTree& Frame::Tree() const { | 196 inline FrameTree& Frame::Tree() const { |
| 186 return tree_node_; | 197 return tree_node_; |
| 187 } | 198 } |
| 188 | 199 |
| 189 // Allow equality comparisons of Frames by reference or pointer, | 200 // Allow equality comparisons of Frames by reference or pointer, |
| 190 // interchangeably. | 201 // interchangeably. |
| 191 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) | 202 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) |
| 192 | 203 |
| 193 } // namespace blink | 204 } // namespace blink |
| 194 | 205 |
| 195 #endif // Frame_h | 206 #endif // Frame_h |
| OLD | NEW |