| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> { | 53 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> { |
| 54 public: | 54 public: |
| 55 virtual ~Frame(); | 55 virtual ~Frame(); |
| 56 | 56 |
| 57 virtual void trace(Visitor*); | 57 virtual void trace(Visitor*); |
| 58 | 58 |
| 59 virtual bool isLocalFrame() const { return false; } | 59 virtual bool isLocalFrame() const { return false; } |
| 60 virtual bool isRemoteFrame() const { return false; } | 60 virtual bool isRemoteFrame() const { return false; } |
| 61 | 61 |
| 62 // FIXME: This should return a DOMWindow*. |
| 63 virtual LocalDOMWindow* domWindow() const = 0; |
| 64 |
| 62 virtual void navigate(Document& originDocument, const KURL&, bool lockBackFo
rwardList) = 0; | 65 virtual void navigate(Document& originDocument, const KURL&, bool lockBackFo
rwardList) = 0; |
| 63 | 66 |
| 64 virtual void detach(); | 67 virtual void detach(); |
| 65 void detachChildren(); | 68 void detachChildren(); |
| 66 virtual void disconnectOwnerElement(); | 69 virtual void disconnectOwnerElement(); |
| 67 | 70 |
| 68 FrameClient* client() const; | 71 FrameClient* client() const; |
| 69 | 72 |
| 70 // NOTE: Page is moving out of Blink up into the browser process as | 73 // NOTE: Page is moving out of Blink up into the browser process as |
| 71 // part of the site-isolation (out of process iframes) work. | 74 // part of the site-isolation (out of process iframes) work. |
| 72 // FrameHost should be used instead where possible. | 75 // FrameHost should be used instead where possible. |
| 73 Page* page() const; | 76 Page* page() const; |
| 74 FrameHost* host() const; // Null when the frame is detached. | 77 FrameHost* host() const; // Null when the frame is detached. |
| 75 | 78 |
| 76 bool isMainFrame() const; | 79 bool isMainFrame() const; |
| 77 bool isLocalRoot() const; | 80 bool isLocalRoot() const; |
| 78 | 81 |
| 79 FrameOwner* owner() const; | 82 FrameOwner* owner() const; |
| 80 void setOwner(FrameOwner* owner) { m_owner = owner; } | 83 void setOwner(FrameOwner* owner) { m_owner = owner; } |
| 81 HTMLFrameOwnerElement* deprecatedLocalOwner() const; | 84 HTMLFrameOwnerElement* deprecatedLocalOwner() const; |
| 82 | 85 |
| 83 // FIXME: LocalDOMWindow and Document should both be moved to LocalFrame | |
| 84 // after RemoteFrame is complete enough to exist without them. | |
| 85 virtual void setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow>); | |
| 86 LocalDOMWindow* domWindow() const; | |
| 87 | |
| 88 FrameTree& tree() const; | 86 FrameTree& tree() const; |
| 89 ChromeClient& chromeClient() const; | 87 ChromeClient& chromeClient() const; |
| 90 | 88 |
| 91 RenderPart* ownerRenderer() const; // Renderer for the element that contains
this frame. | 89 RenderPart* ownerRenderer() const; // Renderer for the element that contains
this frame. |
| 92 | 90 |
| 93 // FIXME: These should move to RemoteFrame when that is instantiated. | 91 // FIXME: These should move to RemoteFrame when that is instantiated. |
| 94 void setRemotePlatformLayer(WebLayer*); | 92 void setRemotePlatformLayer(WebLayer*); |
| 95 WebLayer* remotePlatformLayer() const { return m_remotePlatformLayer; } | 93 WebLayer* remotePlatformLayer() const { return m_remotePlatformLayer; } |
| 96 | 94 |
| 97 Settings* settings() const; // can be null | 95 Settings* settings() const; // can be null |
| 98 | 96 |
| 99 // FIXME: This method identifies a LocalFrame that is acting as a RemoteFram
e. | 97 // 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 | 98 // 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() | 99 // it can be removed and its callers can be converted to use the isRemoteFra
me() |
| 102 // method. | 100 // method. |
| 103 bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; } | 101 bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; } |
| 104 | 102 |
| 105 protected: | 103 protected: |
| 106 Frame(FrameClient*, FrameHost*, FrameOwner*); | 104 Frame(FrameClient*, FrameHost*, FrameOwner*); |
| 107 | 105 |
| 108 mutable FrameTree m_treeNode; | 106 mutable FrameTree m_treeNode; |
| 109 | 107 |
| 110 RawPtrWillBeMember<FrameHost> m_host; | 108 RawPtrWillBeMember<FrameHost> m_host; |
| 111 RawPtrWillBeMember<FrameOwner> m_owner; | 109 RawPtrWillBeMember<FrameOwner> m_owner; |
| 112 | 110 |
| 113 RefPtrWillBeMember<LocalDOMWindow> m_domWindow; | |
| 114 | |
| 115 private: | 111 private: |
| 116 FrameClient* m_client; | 112 FrameClient* m_client; |
| 117 WebLayer* m_remotePlatformLayer; | 113 WebLayer* m_remotePlatformLayer; |
| 118 }; | 114 }; |
| 119 | 115 |
| 120 inline FrameClient* Frame::client() const | 116 inline FrameClient* Frame::client() const |
| 121 { | 117 { |
| 122 return m_client; | 118 return m_client; |
| 123 } | 119 } |
| 124 | 120 |
| 125 inline LocalDOMWindow* Frame::domWindow() const | |
| 126 { | |
| 127 return m_domWindow.get(); | |
| 128 } | |
| 129 | |
| 130 inline FrameOwner* Frame::owner() const | 121 inline FrameOwner* Frame::owner() const |
| 131 { | 122 { |
| 132 return m_owner; | 123 return m_owner; |
| 133 } | 124 } |
| 134 | 125 |
| 135 inline FrameTree& Frame::tree() const | 126 inline FrameTree& Frame::tree() const |
| 136 { | 127 { |
| 137 return m_treeNode; | 128 return m_treeNode; |
| 138 } | 129 } |
| 139 | 130 |
| 140 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. | 131 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. |
| 141 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) | 132 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) |
| 142 | 133 |
| 143 } // namespace blink | 134 } // namespace blink |
| 144 | 135 |
| 145 #endif // Frame_h | 136 #endif // Frame_h |
| OLD | NEW |