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

Side by Side Diff: components/exo/pointer_delegate.h

Issue 2458853002: exo: Replace fling cancel with generic zero distance scroll
Patch Set: fixed unittest Created 4 years, 1 month 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_EXO_POINTER_DELEGATE_H_ 5 #ifndef COMPONENTS_EXO_POINTER_DELEGATE_H_
6 #define COMPONENTS_EXO_POINTER_DELEGATE_H_ 6 #define COMPONENTS_EXO_POINTER_DELEGATE_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 int changed_button_flags, 50 int changed_button_flags,
51 bool pressed) = 0; 51 bool pressed) = 0;
52 52
53 // Called when pointer is scrolling. |offset| contains the direction and 53 // Called when pointer is scrolling. |offset| contains the direction and
54 // distance of the change. |discrete| is true if the scrolling is caused 54 // distance of the change. |discrete| is true if the scrolling is caused
55 // by a discrete device such as a scroll wheel. 55 // by a discrete device such as a scroll wheel.
56 virtual void OnPointerScroll(base::TimeTicks time_stamp, 56 virtual void OnPointerScroll(base::TimeTicks time_stamp,
57 const gfx::Vector2dF& offset, 57 const gfx::Vector2dF& offset,
58 bool discrete) = 0; 58 bool discrete) = 0;
59 59
60 // Called when a current kinetic scroll should be canceled.
61 virtual void OnPointerScrollCancel(base::TimeTicks time_stamp) = 0;
62
63 // Called when pointer scroll has stopped and a fling is happening (e.g. 60 // Called when pointer scroll has stopped and a fling is happening (e.g.
64 // lifting the fingers from the touchpad after scrolling quickly) 61 // lifting the fingers from the touchpad after scrolling quickly)
65 virtual void OnPointerScrollStop(base::TimeTicks time_stamp) = 0; 62 virtual void OnPointerScrollStop(base::TimeTicks time_stamp) = 0;
66 63
67 // Called after all pointer information of this frame has been set and the 64 // Called after all pointer information of this frame has been set and the
68 // client should evaluate the updated state. No events are being sent before 65 // client should evaluate the updated state. No events are being sent before
69 // this method is called. 66 // this method is called.
70 virtual void OnPointerFrame() = 0; 67 virtual void OnPointerFrame() = 0;
71 68
72 protected: 69 protected:
73 virtual ~PointerDelegate() {} 70 virtual ~PointerDelegate() {}
74 }; 71 };
75 72
76 } // namespace exo 73 } // namespace exo
77 74
78 #endif // COMPONENTS_EXO_POINTER_DELEGATE_H_ 75 #endif // COMPONENTS_EXO_POINTER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698