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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 FloatPoint currentPosition() const; 73 FloatPoint currentPosition() const;
74 74
75 virtual void cancelAnimations() { } 75 virtual void cancelAnimations() { }
76 virtual void serviceScrollAnimations() { } 76 virtual void serviceScrollAnimations() { }
77 virtual bool hasRunningAnimation() const { return false; } 77 virtual bool hasRunningAnimation() const { return false; }
78 78
79 virtual void contentAreaWillPaint() const { } 79 virtual void contentAreaWillPaint() const { }
80 virtual void mouseEnteredContentArea() const { } 80 virtual void mouseEnteredContentArea() const { }
81 virtual void mouseExitedContentArea() const { } 81 virtual void mouseExitedContentArea() const { }
82 virtual void mouseMovedInContentArea() const { } 82 virtual void mouseMovedInContentArea() const { }
83 virtual void mouseEnteredScrollbar(Scrollbar*) const { } 83 virtual void mouseEnteredScrollbar(Scrollbar&) const { }
84 virtual void mouseExitedScrollbar(Scrollbar*) const { } 84 virtual void mouseExitedScrollbar(Scrollbar&) const { }
85 virtual void willStartLiveResize() { } 85 virtual void willStartLiveResize() { }
86 virtual void updateAfterLayout() { } 86 virtual void updateAfterLayout() { }
87 virtual void contentsResized() const { } 87 virtual void contentsResized() const { }
88 virtual void willEndLiveResize() { } 88 virtual void willEndLiveResize() { }
89 virtual void contentAreaDidShow() const { } 89 virtual void contentAreaDidShow() const { }
90 virtual void contentAreaDidHide() const { } 90 virtual void contentAreaDidHide() const { }
91 91
92 virtual void finishCurrentScrollAnimations() { } 92 virtual void finishCurrentScrollAnimations() { }
93 93
94 virtual void didAddVerticalScrollbar(Scrollbar*) { } 94 virtual void didAddVerticalScrollbar(Scrollbar&) { }
95 virtual void willRemoveVerticalScrollbar(Scrollbar*) { } 95 virtual void willRemoveVerticalScrollbar(Scrollbar&) { }
96 virtual void didAddHorizontalScrollbar(Scrollbar*) { } 96 virtual void didAddHorizontalScrollbar(Scrollbar&) { }
97 virtual void willRemoveHorizontalScrollbar(Scrollbar*) { } 97 virtual void willRemoveHorizontalScrollbar(Scrollbar&) { }
98 98
99 virtual bool shouldScrollbarParticipateInHitTesting(Scrollbar*) { return tru e; } 99 virtual bool shouldScrollbarParticipateInHitTesting(Scrollbar&) { return tru e; }
100 100
101 virtual void notifyContentAreaScrolled(const FloatSize&) { } 101 virtual void notifyContentAreaScrolled(const FloatSize&) { }
102 102
103 virtual bool setScrollbarsVisibleForTesting(bool) { return false; } 103 virtual bool setScrollbarsVisibleForTesting(bool) { return false; }
104 104
105 DECLARE_VIRTUAL_TRACE(); 105 DECLARE_VIRTUAL_TRACE();
106 106
107 protected: 107 protected:
108 explicit ScrollAnimatorBase(ScrollableArea*); 108 explicit ScrollAnimatorBase(ScrollableArea*);
109 109
110 virtual void notifyPositionChanged(); 110 virtual void notifyPositionChanged();
111 111
112 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; 112 RawPtrWillBeMember<ScrollableArea> m_scrollableArea;
113 float m_currentPosX; // We avoid using a FloatPoint in order to reduce 113 float m_currentPosX; // We avoid using a FloatPoint in order to reduce
114 float m_currentPosY; // subclass code complexity. 114 float m_currentPosY; // subclass code complexity.
115 115
116 private: 116 private:
117 float clampScrollPosition(ScrollbarOrientation, float); 117 float clampScrollPosition(ScrollbarOrientation, float);
118 }; 118 };
119 119
120 } // namespace blink 120 } // namespace blink
121 121
122 #endif // ScrollAnimatorBase_h 122 #endif // ScrollAnimatorBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698