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

Side by Side Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h

Issue 1477113003: [Oilpan] Move ScrollAnimators onto oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 12 matching lines...) Expand all
23 * THE POSSIBILITY OF SUCH DAMAGE. 23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef ScrollAnimatorMac_h 26 #ifndef ScrollAnimatorMac_h
27 #define ScrollAnimatorMac_h 27 #define ScrollAnimatorMac_h
28 28
29 #include "platform/Timer.h" 29 #include "platform/Timer.h"
30 #include "platform/geometry/FloatPoint.h" 30 #include "platform/geometry/FloatPoint.h"
31 #include "platform/geometry/FloatSize.h" 31 #include "platform/geometry/FloatSize.h"
32 #include "platform/geometry/IntRect.h" 32 #include "platform/geometry/IntRect.h"
33 #include "platform/heap/Handle.h"
33 #include "platform/scroll/ScrollAnimatorBase.h" 34 #include "platform/scroll/ScrollAnimatorBase.h"
34 #include "wtf/RetainPtr.h" 35 #include "wtf/RetainPtr.h"
35 36
36 OBJC_CLASS WebScrollAnimationHelperDelegate; 37 OBJC_CLASS WebScrollAnimationHelperDelegate;
37 OBJC_CLASS WebScrollbarPainterControllerDelegate; 38 OBJC_CLASS WebScrollbarPainterControllerDelegate;
38 OBJC_CLASS WebScrollbarPainterDelegate; 39 OBJC_CLASS WebScrollbarPainterDelegate;
39 40
40 typedef id ScrollbarPainterController; 41 typedef id ScrollbarPainterController;
41 42
42 namespace blink { 43 namespace blink {
43 44
44 class Scrollbar; 45 class Scrollbar;
45 46
46 class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimatorBase { 47 class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimatorBase {
47 48 WILL_BE_USING_PRE_FINALIZER(ScrollAnimatorMac, dispose);
48 public: 49 public:
49 ScrollAnimatorMac(ScrollableArea*); 50 ScrollAnimatorMac(ScrollableArea*);
50 ~ScrollAnimatorMac() override; 51 ~ScrollAnimatorMac() override;
51 52
53 void dispose() override;
54
52 void immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition) ; 55 void immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition) ;
53 bool haveScrolledSincePageLoad() const { return m_haveScrolledSincePageLoad; } 56 bool haveScrolledSincePageLoad() const { return m_haveScrolledSincePageLoad; }
54 57
55 void updateScrollerStyle(); 58 void updateScrollerStyle();
56 59
57 bool scrollbarPaintTimerIsActive() const; 60 bool scrollbarPaintTimerIsActive() const;
58 void startScrollbarPaintTimer(); 61 void startScrollbarPaintTimer();
59 void stopScrollbarPaintTimer(); 62 void stopScrollbarPaintTimer();
60 63
61 void sendContentAreaScrolledSoon(const FloatSize& scrollDelta); 64 void sendContentAreaScrolledSoon(const FloatSize& scrollDelta);
62 65
63 void setVisibleScrollerThumbRect(const IntRect&); 66 void setVisibleScrollerThumbRect(const IntRect&);
64 67
65 static bool canUseCoordinatedScrollbar(); 68 static bool canUseCoordinatedScrollbar();
66 69
70 DEFINE_INLINE_VIRTUAL_TRACE()
71 {
72 ScrollAnimatorBase::trace(visitor);
73 }
74
67 private: 75 private:
68 RetainPtr<id> m_scrollAnimationHelper; 76 RetainPtr<id> m_scrollAnimationHelper;
69 RetainPtr<WebScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate; 77 RetainPtr<WebScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate;
70 78
71 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController; 79 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController;
72 RetainPtr<WebScrollbarPainterControllerDelegate> m_scrollbarPainterControlle rDelegate; 80 RetainPtr<WebScrollbarPainterControllerDelegate> m_scrollbarPainterControlle rDelegate;
73 RetainPtr<WebScrollbarPainterDelegate> m_horizontalScrollbarPainterDelegate; 81 RetainPtr<WebScrollbarPainterDelegate> m_horizontalScrollbarPainterDelegate;
74 RetainPtr<WebScrollbarPainterDelegate> m_verticalScrollbarPainterDelegate; 82 RetainPtr<WebScrollbarPainterDelegate> m_verticalScrollbarPainterDelegate;
75 83
76 void initialScrollbarPaintTimerFired(Timer<ScrollAnimatorMac>*); 84 void initialScrollbarPaintTimerFired(Timer<ScrollAnimatorMac>*);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void immediateScrollTo(const FloatPoint&); 129 void immediateScrollTo(const FloatPoint&);
122 130
123 bool m_haveScrolledSincePageLoad; 131 bool m_haveScrolledSincePageLoad;
124 bool m_needsScrollerStyleUpdate; 132 bool m_needsScrollerStyleUpdate;
125 IntRect m_visibleScrollerThumbRect; 133 IntRect m_visibleScrollerThumbRect;
126 }; 134 };
127 135
128 } // namespace blink 136 } // namespace blink
129 137
130 #endif // ScrollAnimatorMac_h 138 #endif // ScrollAnimatorMac_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698