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/HashSet.h" | 34 #include "wtf/HashSet.h" |
35 #include "wtf/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 class WebLayer; | 38 class WebLayer; |
39 } | 39 } |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 class ChromeClient; | 43 class ChromeClient; |
44 class DOMWindow; | |
45 class FrameClient; | 44 class FrameClient; |
46 class FrameDestructionObserver; | 45 class FrameDestructionObserver; |
47 class FrameHost; | 46 class FrameHost; |
48 class FrameOwner; | 47 class FrameOwner; |
49 class HTMLFrameOwnerElement; | 48 class HTMLFrameOwnerElement; |
| 49 class LocalDOMWindow; |
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> { |
55 public: | 55 public: |
56 virtual bool isLocalFrame() const { return false; } | 56 virtual bool isLocalFrame() const { return false; } |
57 virtual bool isRemoteFrame() const { return false; } | 57 virtual bool isRemoteFrame() const { return false; } |
58 | 58 |
59 virtual ~Frame(); | 59 virtual ~Frame(); |
(...skipping 13 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 FrameTree& Frame::tree() const | 142 inline FrameTree& Frame::tree() const |
143 { | 143 { |
144 return m_treeNode; | 144 return m_treeNode; |
145 } | 145 } |
146 | 146 |
147 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. | 147 // Allow equality comparisons of Frames by reference or pointer, interchangeably
. |
148 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) | 148 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) |
149 | 149 |
150 } // namespace WebCore | 150 } // namespace WebCore |
151 | 151 |
152 #endif // Frame_h | 152 #endif // Frame_h |
OLD | NEW |