| 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 17 matching lines...) Expand all Loading... |
| 28 #ifndef LocalFrame_h | 28 #ifndef LocalFrame_h |
| 29 #define LocalFrame_h | 29 #define LocalFrame_h |
| 30 | 30 |
| 31 #include "core/frame/Frame.h" | 31 #include "core/frame/Frame.h" |
| 32 #include "core/loader/FrameLoader.h" | 32 #include "core/loader/FrameLoader.h" |
| 33 #include "core/loader/NavigationScheduler.h" | 33 #include "core/loader/NavigationScheduler.h" |
| 34 #include "core/page/FrameTree.h" | 34 #include "core/page/FrameTree.h" |
| 35 #include "platform/Supplementable.h" | 35 #include "platform/Supplementable.h" |
| 36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
| 37 #include "platform/scroll/ScrollTypes.h" | 37 #include "platform/scroll/ScrollTypes.h" |
| 38 #include "wtf/HashSet.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 class Color; | 42 class Color; |
| 42 class Document; | 43 class Document; |
| 43 class DragImage; | 44 class DragImage; |
| 44 class Editor; | 45 class Editor; |
| 45 class EventHandler; | 46 class EventHandler; |
| 46 class FetchContext; | 47 class FetchContext; |
| 47 class FloatSize; | 48 class FloatSize; |
| 48 class FloatRect; | 49 class FloatRect; |
| 49 class FrameConsole; | 50 class FrameConsole; |
| 51 class FrameDestructionObserver; |
| 50 class FrameSelection; | 52 class FrameSelection; |
| 51 class FrameView; | 53 class FrameView; |
| 52 class InputMethodController; | 54 class InputMethodController; |
| 53 class IntPoint; | 55 class IntPoint; |
| 54 class IntSize; | 56 class IntSize; |
| 55 class Node; | 57 class Node; |
| 56 class Range; | 58 class Range; |
| 57 class RenderView; | 59 class RenderView; |
| 58 class TreeScope; | 60 class TreeScope; |
| 59 class ScriptController; | 61 class ScriptController; |
| 60 class SpellChecker; | 62 class SpellChecker; |
| 61 class TreeScope; | 63 class TreeScope; |
| 62 class VisiblePosition; | 64 class VisiblePosition; |
| 63 | 65 |
| 64 class LocalFrame : public Frame, public WillBePersistentHeapSupplementable<L
ocalFrame> { | 66 class LocalFrame : public Frame, public WillBePersistentHeapSupplementable<L
ocalFrame> { |
| 65 public: | 67 public: |
| 66 static PassRefPtr<LocalFrame> create(FrameLoaderClient*, FrameHost*, Fra
meOwner*); | 68 static PassRefPtr<LocalFrame> create(FrameLoaderClient*, FrameHost*, Fra
meOwner*); |
| 67 | 69 |
| 68 virtual bool isLocalFrame() const OVERRIDE { return true; } | 70 virtual bool isLocalFrame() const OVERRIDE { return true; } |
| 69 | 71 |
| 70 void init(); | 72 void init(); |
| 71 void setView(PassRefPtr<FrameView>); | 73 void setView(PassRefPtr<FrameView>); |
| 72 void createView(const IntSize&, const Color&, bool, | 74 void createView(const IntSize&, const Color&, bool, |
| 73 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false, | 75 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false, |
| 74 ScrollbarMode = ScrollbarAuto, bool verticalLock = false); | 76 ScrollbarMode = ScrollbarAuto, bool verticalLock = false); |
| 75 | 77 |
| 76 virtual ~LocalFrame(); | 78 virtual ~LocalFrame(); |
| 77 | 79 |
| 78 virtual void willDetachFrameHost() OVERRIDE; | 80 void addDestructionObserver(FrameDestructionObserver*); |
| 79 virtual void detachFromFrameHost() OVERRIDE; | 81 void removeDestructionObserver(FrameDestructionObserver*); |
| 82 |
| 83 void willDetachFrameHost(); |
| 84 void detachFromFrameHost(); |
| 80 | 85 |
| 81 virtual void disconnectOwnerElement() OVERRIDE; | 86 virtual void disconnectOwnerElement() OVERRIDE; |
| 82 | 87 |
| 83 virtual void setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow>) OVERRI
DE; | 88 virtual void setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow>) OVERRI
DE; |
| 84 FrameView* view() const; | 89 FrameView* view() const; |
| 85 Document* document() const; | 90 Document* document() const; |
| 86 | 91 |
| 87 RenderView* contentRenderer() const; // Root of the render tree for the
document contained in this frame. | 92 RenderView* contentRenderer() const; // Root of the render tree for the
document contained in this frame. |
| 88 | 93 |
| 89 Editor& editor() const; | 94 Editor& editor() const; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 148 |
| 144 bool isURLAllowed(const KURL&) const; | 149 bool isURLAllowed(const KURL&) const; |
| 145 | 150 |
| 146 // ======== | 151 // ======== |
| 147 | 152 |
| 148 private: | 153 private: |
| 149 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*); | 154 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*); |
| 150 | 155 |
| 151 String localLayerTreeAsText(unsigned flags) const; | 156 String localLayerTreeAsText(unsigned flags) const; |
| 152 | 157 |
| 158 HashSet<FrameDestructionObserver*> m_destructionObservers; |
| 153 mutable FrameLoader m_loader; | 159 mutable FrameLoader m_loader; |
| 154 mutable NavigationScheduler m_navigationScheduler; | 160 mutable NavigationScheduler m_navigationScheduler; |
| 155 | 161 |
| 156 RefPtr<FrameView> m_view; | 162 RefPtr<FrameView> m_view; |
| 157 | 163 |
| 158 OwnPtr<ScriptController> m_script; | 164 OwnPtr<ScriptController> m_script; |
| 159 const OwnPtrWillBePersistent<Editor> m_editor; | 165 const OwnPtrWillBePersistent<Editor> m_editor; |
| 160 const OwnPtr<SpellChecker> m_spellChecker; | 166 const OwnPtr<SpellChecker> m_spellChecker; |
| 161 const OwnPtrWillBePersistent<FrameSelection> m_selection; | 167 const OwnPtrWillBePersistent<FrameSelection> m_selection; |
| 162 const OwnPtrWillBePersistent<EventHandler> m_eventHandler; | 168 const OwnPtrWillBePersistent<EventHandler> m_eventHandler; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 DEFINE_TYPE_CASTS(LocalFrame, Frame, localFrame, localFrame->isLocalFrame(),
localFrame.isLocalFrame()); | 244 DEFINE_TYPE_CASTS(LocalFrame, Frame, localFrame, localFrame->isLocalFrame(),
localFrame.isLocalFrame()); |
| 239 | 245 |
| 240 } // namespace blink | 246 } // namespace blink |
| 241 | 247 |
| 242 // During refactoring, there are some places where we need to do type conversion
s that | 248 // During refactoring, there are some places where we need to do type conversion
s that |
| 243 // will not be needed once all instances of LocalFrame and RemoteFrame are sorte
d out. | 249 // will not be needed once all instances of LocalFrame and RemoteFrame are sorte
d out. |
| 244 // At that time this #define will be removed and all the uses of it will need to
be corrected. | 250 // At that time this #define will be removed and all the uses of it will need to
be corrected. |
| 245 #define toLocalFrameTemporary toLocalFrame | 251 #define toLocalFrameTemporary toLocalFrame |
| 246 | 252 |
| 247 #endif // LocalFrame_h | 253 #endif // LocalFrame_h |
| OLD | NEW |