| 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 23 matching lines...) Expand all Loading... |
| 34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include "wtf/HashSet.h" | 35 #include "wtf/HashSet.h" |
| 36 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 class WebLayer; | 39 class WebLayer; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class DOMWindow; | 44 class LocalDOMWindow; |
| 45 class ChromeClient; | 45 class ChromeClient; |
| 46 class FrameClient; | 46 class FrameClient; |
| 47 class FrameDestructionObserver; | 47 class FrameDestructionObserver; |
| 48 class FrameHost; | 48 class FrameHost; |
| 49 class FrameOwner; | 49 class FrameOwner; |
| 50 class Page; | 50 class Page; |
| 51 class RenderPart; | 51 class RenderPart; |
| 52 class Settings; | 52 class Settings; |
| 53 | 53 |
| 54 class Frame : public RefCounted<Frame> { | 54 class Frame : public RefCounted<Frame> { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 73 Page* page() const; | 73 Page* page() const; |
| 74 FrameHost* host() const; // Null when the frame is detached. | 74 FrameHost* host() const; // Null when the frame is detached. |
| 75 | 75 |
| 76 bool isMainFrame() const; | 76 bool isMainFrame() const; |
| 77 | 77 |
| 78 virtual void disconnectOwnerElement(); | 78 virtual void disconnectOwnerElement(); |
| 79 | 79 |
| 80 FrameOwner* owner() const; | 80 FrameOwner* owner() const; |
| 81 HTMLFrameOwnerElement* deprecatedLocalOwner() const; | 81 HTMLFrameOwnerElement* deprecatedLocalOwner() const; |
| 82 | 82 |
| 83 // FIXME: DOMWindow and Document should both be moved to LocalFrame | 83 // FIXME: LocalDOMWindow and Document should both be moved to LocalFrame |
| 84 // after RemoteFrame is complete enough to exist without them. | 84 // after RemoteFrame is complete enough to exist without them. |
| 85 virtual void setDOMWindow(PassRefPtrWillBeRawPtr<DOMWindow>); | 85 virtual void setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow>); |
| 86 DOMWindow* domWindow() const; | 86 LocalDOMWindow* domWindow() const; |
| 87 | 87 |
| 88 FrameTree& tree() const; | 88 FrameTree& tree() const; |
| 89 ChromeClient& chromeClient() const; | 89 ChromeClient& chromeClient() const; |
| 90 | 90 |
| 91 RenderPart* ownerRenderer() const; // Renderer for the element that contains
this frame. | 91 RenderPart* ownerRenderer() const; // Renderer for the element that contains
this frame. |
| 92 | 92 |
| 93 // FIXME: These should move to RemoteFrame when that is instantiated. | 93 // FIXME: These should move to RemoteFrame when that is instantiated. |
| 94 void setRemotePlatformLayer(blink::WebLayer* remotePlatformLayer) { m_remote
PlatformLayer = remotePlatformLayer; } | 94 void setRemotePlatformLayer(blink::WebLayer* remotePlatformLayer) { m_remote
PlatformLayer = remotePlatformLayer; } |
| 95 blink::WebLayer* remotePlatformLayer() const { return m_remotePlatformLayer;
} | 95 blink::WebLayer* remotePlatformLayer() const { return m_remotePlatformLayer;
} |
| 96 | 96 |
| 97 Settings* settings() const; // can be null | 97 Settings* settings() const; // can be null |
| 98 | 98 |
| 99 // FIXME: This method identifies a LocalFrame that is acting as a RemoteFram
e. | 99 // FIXME: This method identifies a LocalFrame that is acting as a RemoteFram
e. |
| 100 // It is necessary only until we can instantiate a RemoteFrame, at which poi
nt | 100 // It is necessary only until we can instantiate a RemoteFrame, at which poi
nt |
| 101 // it can be removed and its callers can be converted to use the isRemoteFra
me() | 101 // it can be removed and its callers can be converted to use the isRemoteFra
me() |
| 102 // method. | 102 // method. |
| 103 bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; } | 103 bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; } |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 Frame(FrameClient*, FrameHost*, FrameOwner*); | 106 Frame(FrameClient*, FrameHost*, FrameOwner*); |
| 107 | 107 |
| 108 mutable FrameTree m_treeNode; | 108 mutable FrameTree m_treeNode; |
| 109 | 109 |
| 110 FrameHost* m_host; | 110 FrameHost* m_host; |
| 111 FrameOwner* m_owner; | 111 FrameOwner* m_owner; |
| 112 | 112 |
| 113 RefPtrWillBePersistent<DOMWindow> m_domWindow; | 113 RefPtrWillBePersistent<LocalDOMWindow> m_domWindow; |
| 114 | 114 |
| 115 private: | 115 private: |
| 116 FrameClient* m_client; | 116 FrameClient* m_client; |
| 117 HashSet<FrameDestructionObserver*> m_destructionObservers; | 117 HashSet<FrameDestructionObserver*> m_destructionObservers; |
| 118 | 118 |
| 119 blink::WebLayer* m_remotePlatformLayer; | 119 blink::WebLayer* m_remotePlatformLayer; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 inline FrameClient* Frame::client() const | 122 inline FrameClient* Frame::client() const |
| 123 { | 123 { |
| 124 return m_client; | 124 return m_client; |
| 125 } | 125 } |
| 126 | 126 |
| 127 inline void Frame::clearClient() | 127 inline void Frame::clearClient() |
| 128 { | 128 { |
| 129 m_client = 0; | 129 m_client = 0; |
| 130 } | 130 } |
| 131 | 131 |
| 132 inline DOMWindow* Frame::domWindow() const | 132 inline LocalDOMWindow* Frame::domWindow() const |
| 133 { | 133 { |
| 134 return m_domWindow.get(); | 134 return m_domWindow.get(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 inline FrameOwner* Frame::owner() const | 137 inline FrameOwner* Frame::owner() const |
| 138 { | 138 { |
| 139 return m_owner; | 139 return m_owner; |
| 140 } | 140 } |
| 141 | 141 |
| 142 inline HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const | 142 inline HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const |
| 143 { | 143 { |
| 144 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; | 144 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; |
| 145 } | 145 } |
| 146 | 146 |
| 147 inline FrameTree& Frame::tree() const | 147 inline FrameTree& Frame::tree() const |
| 148 { | 148 { |
| 149 return m_treeNode; | 149 return m_treeNode; |
| 150 } | 150 } |
| 151 | 151 |
| 152 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. | 152 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. |
| 153 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) | 153 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) |
| 154 | 154 |
| 155 } // namespace WebCore | 155 } // namespace WebCore |
| 156 | 156 |
| 157 #endif // Frame_h | 157 #endif // Frame_h |
| OLD | NEW |