Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: Source/core/frame/LocalFrame.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class IntSize; 57 class IntSize;
58 class Node; 58 class Node;
59 class Range; 59 class Range;
60 class RenderView; 60 class RenderView;
61 class TreeScope; 61 class TreeScope;
62 class ScriptController; 62 class ScriptController;
63 class SpellChecker; 63 class SpellChecker;
64 class TreeScope; 64 class TreeScope;
65 class VisiblePosition; 65 class VisiblePosition;
66 66
67 class LocalFrame : public Frame, public WillBePersistentHeapSupplementable<L ocalFrame> { 67 class LocalFrame : public Frame, public WillBeHeapSupplementable<LocalFrame> {
68 public: 68 public:
69 static PassRefPtr<LocalFrame> create(FrameLoaderClient*, FrameHost*, Fra meOwner*); 69 static PassRefPtrWillBeRawPtr<LocalFrame> create(FrameLoaderClient*, Fra meHost*, FrameOwner*);
70 70
71 virtual bool isLocalFrame() const OVERRIDE { return true; } 71 virtual bool isLocalFrame() const OVERRIDE { return true; }
72 72
73 void init(); 73 void init();
74 void setView(PassRefPtr<FrameView>); 74 void setView(PassRefPtr<FrameView>);
75 void createView(const IntSize&, const Color&, bool, 75 void createView(const IntSize&, const Color&, bool,
76 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false, 76 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false,
77 ScrollbarMode = ScrollbarAuto, bool verticalLock = false); 77 ScrollbarMode = ScrollbarAuto, bool verticalLock = false);
78 78
79 virtual ~LocalFrame(); 79 virtual ~LocalFrame();
80 virtual void trace(Visitor*) OVERRIDE;
80 81
81 virtual void detach() OVERRIDE; 82 virtual void detach() OVERRIDE;
82 83
83 void addDestructionObserver(FrameDestructionObserver*); 84 void addDestructionObserver(FrameDestructionObserver*);
84 void removeDestructionObserver(FrameDestructionObserver*); 85 void removeDestructionObserver(FrameDestructionObserver*);
85 86
86 void willDetachFrameHost(); 87 void willDetachFrameHost();
87 void detachFromFrameHost(); 88 void detachFromFrameHost();
88 89
89 virtual void disconnectOwnerElement() OVERRIDE; 90 virtual void disconnectOwnerElement() OVERRIDE;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool shouldReuseDefaultView(const KURL&) const; 156 bool shouldReuseDefaultView(const KURL&) const;
156 void removeSpellingMarkersUnderWords(const Vector<String>& words); 157 void removeSpellingMarkersUnderWords(const Vector<String>& words);
157 158
158 // ======== 159 // ========
159 160
160 private: 161 private:
161 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*); 162 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*);
162 163
163 String localLayerTreeAsText(unsigned flags) const; 164 String localLayerTreeAsText(unsigned flags) const;
164 165
165 HashSet<FrameDestructionObserver*> m_destructionObservers; 166 void detachView();
167
168 WillBeHeapHashSet<RawPtrWillBeWeakMember<FrameDestructionObserver> > m_d estructionObservers;
166 mutable FrameLoader m_loader; 169 mutable FrameLoader m_loader;
167 mutable NavigationScheduler m_navigationScheduler; 170 mutable NavigationScheduler m_navigationScheduler;
168 171
169 RefPtr<FrameView> m_view; 172 RefPtr<FrameView> m_view;
170 // Usually 0. Non-null if this is the top frame of PagePopup. 173 // Usually 0. Non-null if this is the top frame of PagePopup.
171 RefPtrWillBePersistent<Element> m_pagePopupOwner; 174 RefPtrWillBeMember<Element> m_pagePopupOwner;
172 175
173 OwnPtr<ScriptController> m_script; 176 OwnPtr<ScriptController> m_script;
174 const OwnPtrWillBePersistent<Editor> m_editor; 177 const OwnPtrWillBeMember<Editor> m_editor;
175 const OwnPtr<SpellChecker> m_spellChecker; 178 const OwnPtrWillBeMember<SpellChecker> m_spellChecker;
176 const OwnPtrWillBePersistent<FrameSelection> m_selection; 179 const OwnPtrWillBeMember<FrameSelection> m_selection;
177 const OwnPtrWillBePersistent<EventHandler> m_eventHandler; 180 const OwnPtrWillBeMember<EventHandler> m_eventHandler;
178 const OwnPtrWillBePersistent<FrameConsole> m_console; 181 const OwnPtrWillBeMember<FrameConsole> m_console;
179 OwnPtr<InputMethodController> m_inputMethodController; 182 OwnPtrWillBeMember<InputMethodController> m_inputMethodController;
180 183
181 float m_pageZoomFactor; 184 float m_pageZoomFactor;
182 float m_textZoomFactor; 185 float m_textZoomFactor;
183 186
184 bool m_inViewSourceMode; 187 bool m_inViewSourceMode;
185 }; 188 };
186 189
187 inline void LocalFrame::init() 190 inline void LocalFrame::init()
188 { 191 {
189 m_loader.init(); 192 m_loader.init();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 DEFINE_TYPE_CASTS(LocalFrame, Frame, localFrame, localFrame->isLocalFrame(), localFrame.isLocalFrame()); 256 DEFINE_TYPE_CASTS(LocalFrame, Frame, localFrame, localFrame->isLocalFrame(), localFrame.isLocalFrame());
254 257
255 } // namespace blink 258 } // namespace blink
256 259
257 // During refactoring, there are some places where we need to do type conversion s that 260 // During refactoring, there are some places where we need to do type conversion s that
258 // will not be needed once all instances of LocalFrame and RemoteFrame are sorte d out. 261 // will not be needed once all instances of LocalFrame and RemoteFrame are sorte d out.
259 // At that time this #define will be removed and all the uses of it will need to be corrected. 262 // At that time this #define will be removed and all the uses of it will need to be corrected.
260 #define toLocalFrameTemporary toLocalFrame 263 #define toLocalFrameTemporary toLocalFrame
261 264
262 #endif // LocalFrame_h 265 #endif // LocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698