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

Unified Diff: Source/platform/Widget.h

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased upto r183571 Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/Widget.h
diff --git a/Source/platform/Widget.h b/Source/platform/Widget.h
index ffe2ac6e1dc1327645a8548d5c46e4b6553e23c6..232cec99f51feea5db5121daf7a101a77e12e9f2 100644
--- a/Source/platform/Widget.h
+++ b/Source/platform/Widget.h
@@ -31,6 +31,7 @@
#include "platform/PlatformExport.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/IntRect.h"
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/RefCounted.h"
@@ -48,7 +49,7 @@ class HostWindow;
// Widgets are connected in a hierarchy, with the restriction that plugins and
// scrollbars are always leaves of the tree. Only ScrollViews can have children
// (and therefore the Widget class has no concept of children).
-class PLATFORM_EXPORT Widget : public RefCounted<Widget> {
+class PLATFORM_EXPORT Widget : public RefCountedWillBeGarbageCollectedFinalized<Widget> {
public:
Widget();
virtual ~Widget();
@@ -127,12 +128,11 @@ public:
// Notifies this widget that it will no longer be receiving events.
virtual void eventListenersRemoved() { }
-#if ENABLE(OILPAN)
- virtual void detach() { }
-#endif
+ virtual void trace(Visitor*);
+ virtual void dispose() { }
haraken 2014/10/11 17:33:03 Can we make this a pure virtual method? (Otherwise
sof 2014/10/12 08:16:22 Prefer to keep it like this, providing a default i
private:
- Widget* m_parent;
+ RawPtrWillBeMember<Widget> m_parent;
IntRect m_frame;
bool m_selfVisible;
bool m_parentVisible;

Powered by Google App Engine
This is Rietveld 408576698