| 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
reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 25 * Boston, MA 02110-1301, USA. | 25 * Boston, MA 02110-1301, USA. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef Frame_h | 28 #ifndef Frame_h |
| 29 #define Frame_h | 29 #define Frame_h |
| 30 | 30 |
| 31 #include "core/page/FrameTree.h" | 31 #include "core/page/FrameTree.h" |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "wtf/Forward.h" | 33 #include "wtf/Forward.h" |
| 34 #include "wtf/HashSet.h" | |
| 35 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 36 | 35 |
| 37 namespace blink { | 36 namespace blink { |
| 38 class WebLayer; | 37 class WebLayer; |
| 39 } | 38 } |
| 40 | 39 |
| 41 namespace blink { | 40 namespace blink { |
| 42 | 41 |
| 43 class ChromeClient; | 42 class ChromeClient; |
| 44 class FrameClient; | 43 class FrameClient; |
| 45 class FrameDestructionObserver; | |
| 46 class FrameHost; | 44 class FrameHost; |
| 47 class FrameOwner; | 45 class FrameOwner; |
| 48 class HTMLFrameOwnerElement; | 46 class HTMLFrameOwnerElement; |
| 49 class LocalDOMWindow; | 47 class LocalDOMWindow; |
| 50 class Page; | 48 class Page; |
| 51 class RenderPart; | 49 class RenderPart; |
| 52 class Settings; | 50 class Settings; |
| 53 | 51 |
| 54 class Frame : public RefCounted<Frame> { | 52 class Frame : public RefCounted<Frame> { |
| 55 public: | 53 public: |
| 56 virtual bool isLocalFrame() const { return false; } | 54 virtual bool isLocalFrame() const { return false; } |
| 57 virtual bool isRemoteFrame() const { return false; } | 55 virtual bool isRemoteFrame() const { return false; } |
| 58 | 56 |
| 59 virtual ~Frame(); | 57 virtual ~Frame(); |
| 60 | 58 |
| 61 void addDestructionObserver(FrameDestructionObserver*); | |
| 62 void removeDestructionObserver(FrameDestructionObserver*); | |
| 63 | |
| 64 virtual void willDetachFrameHost(); | |
| 65 virtual void detachFromFrameHost(); | |
| 66 | |
| 67 FrameClient* client() const; | 59 FrameClient* client() const; |
| 68 void clearClient(); | 60 void clearClient(); |
| 69 | 61 |
| 70 // NOTE: Page is moving out of Blink up into the browser process as | 62 // NOTE: Page is moving out of Blink up into the browser process as |
| 71 // part of the site-isolation (out of process iframes) work. | 63 // part of the site-isolation (out of process iframes) work. |
| 72 // FrameHost should be used instead where possible. | 64 // FrameHost should be used instead where possible. |
| 73 Page* page() const; | 65 Page* page() const; |
| 74 FrameHost* host() const; // Null when the frame is detached. | 66 FrameHost* host() const; // Null when the frame is detached. |
| 75 | 67 |
| 76 bool isMainFrame() const; | 68 bool isMainFrame() const; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 100 |
| 109 mutable FrameTree m_treeNode; | 101 mutable FrameTree m_treeNode; |
| 110 | 102 |
| 111 FrameHost* m_host; | 103 FrameHost* m_host; |
| 112 FrameOwner* m_owner; | 104 FrameOwner* m_owner; |
| 113 | 105 |
| 114 RefPtrWillBePersistent<LocalDOMWindow> m_domWindow; | 106 RefPtrWillBePersistent<LocalDOMWindow> m_domWindow; |
| 115 | 107 |
| 116 private: | 108 private: |
| 117 FrameClient* m_client; | 109 FrameClient* m_client; |
| 118 HashSet<FrameDestructionObserver*> m_destructionObservers; | |
| 119 | |
| 120 blink::WebLayer* m_remotePlatformLayer; | 110 blink::WebLayer* m_remotePlatformLayer; |
| 121 }; | 111 }; |
| 122 | 112 |
| 123 inline FrameClient* Frame::client() const | 113 inline FrameClient* Frame::client() const |
| 124 { | 114 { |
| 125 return m_client; | 115 return m_client; |
| 126 } | 116 } |
| 127 | 117 |
| 128 inline void Frame::clearClient() | 118 inline void Frame::clearClient() |
| 129 { | 119 { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 144 { | 134 { |
| 145 return m_treeNode; | 135 return m_treeNode; |
| 146 } | 136 } |
| 147 | 137 |
| 148 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. | 138 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. |
| 149 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) | 139 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) |
| 150 | 140 |
| 151 } // namespace blink | 141 } // namespace blink |
| 152 | 142 |
| 153 #endif // Frame_h | 143 #endif // Frame_h |
| OLD | NEW |