| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 ViewportDescription viewportDescription() const; | 122 ViewportDescription viewportDescription() const; |
| 123 | 123 |
| 124 static void refreshPlugins(bool reload); | 124 static void refreshPlugins(bool reload); |
| 125 PluginData* pluginData() const; | 125 PluginData* pluginData() const; |
| 126 | 126 |
| 127 EditorClient& editorClient() const { return *m_editorClient; } | 127 EditorClient& editorClient() const { return *m_editorClient; } |
| 128 SpellCheckerClient& spellCheckerClient() const { return *m_spellCheckerClien
t; } | 128 SpellCheckerClient& spellCheckerClient() const { return *m_spellCheckerClien
t; } |
| 129 UndoStack& undoStack() const { return *m_undoStack; } | 129 UndoStack& undoStack() const { return *m_undoStack; } |
| 130 | 130 |
| 131 void setMainFrame(PassRefPtr<Frame>); | 131 void setMainFrame(Frame*); |
| 132 Frame* mainFrame() const { return m_mainFrame.get(); } | 132 Frame* mainFrame() const { return m_mainFrame; } |
| 133 // Escape hatch for existing code that assumes that the root frame is | 133 // Escape hatch for existing code that assumes that the root frame is |
| 134 // always a LocalFrame. With OOPI, this is not always the case. Code that | 134 // always a LocalFrame. With OOPI, this is not always the case. Code that |
| 135 // depends on this will generally have to be rewritten to propagate any | 135 // depends on this will generally have to be rewritten to propagate any |
| 136 // necessary state through all renderer processes for that page and/or | 136 // necessary state through all renderer processes for that page and/or |
| 137 // coordinate/rely on the browser process to help dispatch/coordinate work. | 137 // coordinate/rely on the browser process to help dispatch/coordinate work. |
| 138 LocalFrame* deprecatedLocalMainFrame() const { return toLocalFrame(m_mainFra
me.get()); } | 138 LocalFrame* deprecatedLocalMainFrame() const { return toLocalFrame(m_mainFra
me); } |
| 139 | 139 |
| 140 void documentDetached(Document*); | 140 void documentDetached(Document*); |
| 141 | 141 |
| 142 bool openedByDOM() const; | 142 bool openedByDOM() const; |
| 143 void setOpenedByDOM(); | 143 void setOpenedByDOM(); |
| 144 | 144 |
| 145 void incrementSubframeCount() { ++m_subframeCount; } | 145 void incrementSubframeCount() { ++m_subframeCount; } |
| 146 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} | 146 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} |
| 147 int subframeCount() const { checkSubframeCountConsistency(); return m_subfra
meCount; } | 147 int subframeCount() const { checkSubframeCountConsistency(); return m_subfra
meCount; } |
| 148 | 148 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 const OwnPtr<Chrome> m_chrome; | 252 const OwnPtr<Chrome> m_chrome; |
| 253 const OwnPtrWillBeMember<DragCaretController> m_dragCaretController; | 253 const OwnPtrWillBeMember<DragCaretController> m_dragCaretController; |
| 254 const OwnPtrWillBeMember<DragController> m_dragController; | 254 const OwnPtrWillBeMember<DragController> m_dragController; |
| 255 const OwnPtr<FocusController> m_focusController; | 255 const OwnPtr<FocusController> m_focusController; |
| 256 const OwnPtrWillBeMember<ContextMenuController> m_contextMenuController; | 256 const OwnPtrWillBeMember<ContextMenuController> m_contextMenuController; |
| 257 const OwnPtr<InspectorController> m_inspectorController; | 257 const OwnPtr<InspectorController> m_inspectorController; |
| 258 const OwnPtrWillBeMember<PointerLockController> m_pointerLockController; | 258 const OwnPtrWillBeMember<PointerLockController> m_pointerLockController; |
| 259 OwnPtr<ScrollingCoordinator> m_scrollingCoordinator; | 259 OwnPtr<ScrollingCoordinator> m_scrollingCoordinator; |
| 260 const OwnPtrWillBeMember<UndoStack> m_undoStack; | 260 const OwnPtrWillBeMember<UndoStack> m_undoStack; |
| 261 | 261 |
| 262 RefPtr<Frame> m_mainFrame; | 262 // Typically, the main frame and Page should both be owned by the embedder, |
| 263 // which must call Page::willBeDestroyed() prior to destroying Page. This |
| 264 // call detaches the main frame and clears this pointer, thus ensuring that |
| 265 // this field only references a live main frame. |
| 266 // |
| 267 // However, there are several locations (InspectorOverlay, SVGImage, and |
| 268 // WebPagePopupImpl) which don't hold a reference to the main frame at all |
| 269 // after creating it. These are still safe because they always create a |
| 270 // Frame with a FrameView. FrameView and Frame hold references to each |
| 271 // other, thus keeping each other alive. The call to willBeDestroyed() |
| 272 // breaks this cycle, so the frame is still properly destroyed once no |
| 273 // longer needed. |
| 274 Frame* m_mainFrame; |
| 263 | 275 |
| 264 mutable RefPtr<PluginData> m_pluginData; | 276 mutable RefPtr<PluginData> m_pluginData; |
| 265 | 277 |
| 266 BackForwardClient* m_backForwardClient; | 278 BackForwardClient* m_backForwardClient; |
| 267 EditorClient* const m_editorClient; | 279 EditorClient* const m_editorClient; |
| 268 SpellCheckerClient* const m_spellCheckerClient; | 280 SpellCheckerClient* const m_spellCheckerClient; |
| 269 StorageClient* m_storageClient; | 281 StorageClient* m_storageClient; |
| 270 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient; | 282 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient; |
| 271 | 283 |
| 272 UseCounter m_useCounter; | 284 UseCounter m_useCounter; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 294 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m
ultisamplingChangedObservers; | 306 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m
ultisamplingChangedObservers; |
| 295 | 307 |
| 296 // A pointer to all the interfaces provided to in-process Frames for this Pa
ge. | 308 // A pointer to all the interfaces provided to in-process Frames for this Pa
ge. |
| 297 // FIXME: Most of the members of Page should move onto FrameHost. | 309 // FIXME: Most of the members of Page should move onto FrameHost. |
| 298 OwnPtrWillBeMember<FrameHost> m_frameHost; | 310 OwnPtrWillBeMember<FrameHost> m_frameHost; |
| 299 }; | 311 }; |
| 300 | 312 |
| 301 } // namespace WebCore | 313 } // namespace WebCore |
| 302 | 314 |
| 303 #endif // Page_h | 315 #endif // Page_h |
| OLD | NEW |