| 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 30 matching lines...) Expand all Loading... |
| 41 class FrameClient; | 41 class FrameClient; |
| 42 class FrameHost; | 42 class FrameHost; |
| 43 class FrameOwner; | 43 class FrameOwner; |
| 44 class HTMLFrameOwnerElement; | 44 class HTMLFrameOwnerElement; |
| 45 class DOMWindow; | 45 class DOMWindow; |
| 46 class KURL; | 46 class KURL; |
| 47 class Page; | 47 class Page; |
| 48 class RenderPart; | 48 class RenderPart; |
| 49 class SecurityContext; | 49 class SecurityContext; |
| 50 class Settings; | 50 class Settings; |
| 51 class WebLayer; | |
| 52 | 51 |
| 53 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> { | 52 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> { |
| 54 public: | 53 public: |
| 55 virtual ~Frame(); | 54 virtual ~Frame(); |
| 56 | 55 |
| 57 virtual void trace(Visitor*); | 56 virtual void trace(Visitor*); |
| 58 | 57 |
| 59 virtual bool isLocalFrame() const { return false; } | 58 virtual bool isLocalFrame() const { return false; } |
| 60 virtual bool isRemoteFrame() const { return false; } | 59 virtual bool isRemoteFrame() const { return false; } |
| 61 | 60 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 89 virtual SecurityContext* securityContext() const = 0; | 88 virtual SecurityContext* securityContext() const = 0; |
| 90 | 89 |
| 91 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); | 90 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); |
| 92 Frame* findUnsafeParentScrollPropagationBoundary(); | 91 Frame* findUnsafeParentScrollPropagationBoundary(); |
| 93 | 92 |
| 94 bool canNavigate(const Frame&); | 93 bool canNavigate(const Frame&); |
| 95 virtual void printNavigationErrorMessage(const Frame&, const char* reason) =
0; | 94 virtual void printNavigationErrorMessage(const Frame&, const char* reason) =
0; |
| 96 | 95 |
| 97 RenderPart* ownerRenderer() const; // Renderer for the element that contains
this frame. | 96 RenderPart* ownerRenderer() const; // Renderer for the element that contains
this frame. |
| 98 | 97 |
| 99 // FIXME: These should move to RemoteFrame when that is instantiated. | |
| 100 void setRemotePlatformLayer(WebLayer*); | |
| 101 WebLayer* remotePlatformLayer() const { return m_remotePlatformLayer; } | |
| 102 | |
| 103 Settings* settings() const; // can be null | 98 Settings* settings() const; // can be null |
| 104 | 99 |
| 105 // FIXME: This method identifies a LocalFrame that is acting as a RemoteFram
e. | |
| 106 // It is necessary only until we can instantiate a RemoteFrame, at which poi
nt | |
| 107 // it can be removed and its callers can be converted to use the isRemoteFra
me() | |
| 108 // method. | |
| 109 bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; } | |
| 110 | |
| 111 // isLoading() is true when the embedder should think a load is in progress. | 100 // isLoading() is true when the embedder should think a load is in progress. |
| 112 // In the case of LocalFrames, it means that the frame has sent a didStartLo
ading() | 101 // In the case of LocalFrames, it means that the frame has sent a didStartLo
ading() |
| 113 // callback, but not the matching didStopLoading(). Inside blink, you probab
ly | 102 // callback, but not the matching didStopLoading(). Inside blink, you probab
ly |
| 114 // want Document::loadEventFinished() instead. | 103 // want Document::loadEventFinished() instead. |
| 115 void setIsLoading(bool isLoading) { m_isLoading = isLoading; } | 104 void setIsLoading(bool isLoading) { m_isLoading = isLoading; } |
| 116 bool isLoading() const { return m_isLoading; } | 105 bool isLoading() const { return m_isLoading; } |
| 117 virtual bool isLoadingAsChild() const { return isLoading(); } | 106 virtual bool isLoadingAsChild() const { return isLoading(); } |
| 118 | 107 |
| 119 protected: | 108 protected: |
| 120 Frame(FrameClient*, FrameHost*, FrameOwner*); | 109 Frame(FrameClient*, FrameHost*, FrameOwner*); |
| 121 | 110 |
| 122 mutable FrameTree m_treeNode; | 111 mutable FrameTree m_treeNode; |
| 123 | 112 |
| 124 RawPtrWillBeMember<FrameHost> m_host; | 113 RawPtrWillBeMember<FrameHost> m_host; |
| 125 RawPtrWillBeMember<FrameOwner> m_owner; | 114 RawPtrWillBeMember<FrameOwner> m_owner; |
| 126 | 115 |
| 127 private: | 116 private: |
| 128 FrameClient* m_client; | 117 FrameClient* m_client; |
| 129 WebLayer* m_remotePlatformLayer; | |
| 130 | |
| 131 bool m_isLoading; | 118 bool m_isLoading; |
| 132 }; | 119 }; |
| 133 | 120 |
| 134 inline FrameClient* Frame::client() const | 121 inline FrameClient* Frame::client() const |
| 135 { | 122 { |
| 136 return m_client; | 123 return m_client; |
| 137 } | 124 } |
| 138 | 125 |
| 139 inline FrameOwner* Frame::owner() const | 126 inline FrameOwner* Frame::owner() const |
| 140 { | 127 { |
| 141 return m_owner; | 128 return m_owner; |
| 142 } | 129 } |
| 143 | 130 |
| 144 inline FrameTree& Frame::tree() const | 131 inline FrameTree& Frame::tree() const |
| 145 { | 132 { |
| 146 return m_treeNode; | 133 return m_treeNode; |
| 147 } | 134 } |
| 148 | 135 |
| 149 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. | 136 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. |
| 150 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) | 137 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) |
| 151 | 138 |
| 152 } // namespace blink | 139 } // namespace blink |
| 153 | 140 |
| 154 #endif // Frame_h | 141 #endif // Frame_h |
| OLD | NEW |