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

Unified Diff: Source/platform/scroll/Scrollbar.h

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ~Scrollbar assert 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/scroll/Scrollbar.h
diff --git a/Source/platform/scroll/Scrollbar.h b/Source/platform/scroll/Scrollbar.h
index 27d46b98d99954612a2027176326d54a1e0afd19..0b649a35138dd898c66c135b8f06ed053cd52ce3 100644
--- a/Source/platform/scroll/Scrollbar.h
+++ b/Source/platform/scroll/Scrollbar.h
@@ -28,6 +28,7 @@
#include "platform/Timer.h"
#include "platform/Widget.h"
+#include "platform/heap/Handle.h"
#include "platform/scroll/ScrollTypes.h"
#include "platform/scroll/ScrollbarThemeClient.h"
#include "wtf/MathExtras.h"
@@ -39,15 +40,15 @@ class GraphicsContext;
class IntRect;
class PlatformGestureEvent;
class PlatformMouseEvent;
+class ScrollAnimator;
class ScrollableArea;
class ScrollbarTheme;
class ScrollView;
-class PLATFORM_EXPORT Scrollbar : public Widget,
- public ScrollbarThemeClient {
+class PLATFORM_EXPORT Scrollbar : public Widget, public ScrollbarThemeClient {
public:
- static PassRefPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize);
+ static PassRefPtrWillBeRawPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize);
virtual ~Scrollbar();
@@ -100,7 +101,7 @@ public:
// Called by the ScrollableArea when the scroll offset changes.
void offsetDidChange();
- void disconnectFromScrollableArea() { m_scrollableArea = 0; }
+ void disconnectFromScrollableArea();
ScrollableArea* scrollableArea() const { return m_scrollableArea; }
int pressedPos() const { return m_pressedPos; }
@@ -168,6 +169,13 @@ protected:
ScrollbarControlSize m_controlSize;
ScrollbarTheme* m_theme;
haraken 2014/09/29 14:16:36 Are you sure that this raw pointer doesn't become
sof 2014/10/09 07:35:34 It is always a reference to a statically allocated
+#if ENABLE(OILPAN)
+ // To simplify Oilpan finalization, keep a copy of the ScrollableArea's
+ // scroll animator. Scrollbar is responsible for notifying the animator
+ // when it is destructed.
+ RefPtr<ScrollAnimator> m_animator;
+#endif
+
int m_visibleSize;
int m_totalSize;
float m_currentPos;

Powered by Google App Engine
This is Rietveld 408576698