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

Side by Side Diff: sky/engine/platform/scroll/ScrollAnimator.h

Issue 870073003: Remove mouse events from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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) 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SKY_ENGINE_PLATFORM_SCROLL_SCROLLANIMATOR_H_ 31 #ifndef SKY_ENGINE_PLATFORM_SCROLL_SCROLLANIMATOR_H_
32 #define SKY_ENGINE_PLATFORM_SCROLL_SCROLLANIMATOR_H_ 32 #define SKY_ENGINE_PLATFORM_SCROLL_SCROLLANIMATOR_H_
33 33
34 #include "sky/engine/platform/PlatformExport.h" 34 #include "sky/engine/platform/PlatformExport.h"
35 #include "sky/engine/platform/PlatformWheelEvent.h"
36 #include "sky/engine/platform/geometry/FloatSize.h" 35 #include "sky/engine/platform/geometry/FloatSize.h"
37 #include "sky/engine/platform/scroll/ScrollTypes.h" 36 #include "sky/engine/platform/scroll/ScrollTypes.h"
38 #include "sky/engine/wtf/FastAllocBase.h" 37 #include "sky/engine/wtf/FastAllocBase.h"
39 #include "sky/engine/wtf/Forward.h" 38 #include "sky/engine/wtf/Forward.h"
40 #include "sky/engine/wtf/Noncopyable.h" 39 #include "sky/engine/wtf/Noncopyable.h"
41 40
42 namespace blink { 41 namespace blink {
43 42
44 class FloatPoint; 43 class FloatPoint;
45 class ScrollableArea; 44 class ScrollableArea;
(...skipping 11 matching lines...) Expand all
57 // destination and returns true. Scrolling may be immediate or animated. 56 // destination and returns true. Scrolling may be immediate or animated.
58 // The base class implementation always scrolls immediately, never animates. 57 // The base class implementation always scrolls immediately, never animates.
59 virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, flo at delta); 58 virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, flo at delta);
60 59
61 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); 60 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
62 61
63 ScrollableArea* scrollableArea() const { return m_scrollableArea; } 62 ScrollableArea* scrollableArea() const { return m_scrollableArea; }
64 63
65 virtual void setIsActive() { } 64 virtual void setIsActive() { }
66 65
67 virtual bool handleWheelEvent(const PlatformWheelEvent&);
68
69 void setCurrentPosition(const FloatPoint&); 66 void setCurrentPosition(const FloatPoint&);
70 FloatPoint currentPosition() const; 67 FloatPoint currentPosition() const;
71 68
72 virtual void cancelAnimations() { } 69 virtual void cancelAnimations() { }
73 virtual void serviceScrollAnimations() { } 70 virtual void serviceScrollAnimations() { }
74 71
75 virtual void mouseEnteredContentArea() const { } 72 virtual void mouseEnteredContentArea() const { }
76 virtual void mouseExitedContentArea() const { } 73 virtual void mouseExitedContentArea() const { }
77 virtual void mouseMovedInContentArea() const { } 74 virtual void mouseMovedInContentArea() const { }
78 virtual void mouseEnteredScrollbar(Scrollbar*) const { } 75 virtual void mouseEnteredScrollbar(Scrollbar*) const { }
(...skipping 23 matching lines...) Expand all
102 float m_currentPosX; // We avoid using a FloatPoint in order to reduce 99 float m_currentPosX; // We avoid using a FloatPoint in order to reduce
103 float m_currentPosY; // subclass code complexity. 100 float m_currentPosY; // subclass code complexity.
104 101
105 private: 102 private:
106 float clampScrollPosition(ScrollbarOrientation, float); 103 float clampScrollPosition(ScrollbarOrientation, float);
107 }; 104 };
108 105
109 } // namespace blink 106 } // namespace blink
110 107
111 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLANIMATOR_H_ 108 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLANIMATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698