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

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

Issue 2840113002: exo: Replace fling cancel with generic zero distance scroll (Closed)
Patch Set: fixed nit in test Created 3 years, 7 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
« no previous file with comments | « components/exo/pointer.cc ('k') | components/exo/pointer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 int changed_button_flags, 49 int changed_button_flags,
50 bool pressed) = 0; 50 bool pressed) = 0;
51 51
52 // Called when pointer is scrolling. |offset| contains the direction and 52 // Called when pointer is scrolling. |offset| contains the direction and
53 // distance of the change. |discrete| is true if the scrolling is caused 53 // distance of the change. |discrete| is true if the scrolling is caused
54 // by a discrete device such as a scroll wheel. 54 // by a discrete device such as a scroll wheel.
55 virtual void OnPointerScroll(base::TimeTicks time_stamp, 55 virtual void OnPointerScroll(base::TimeTicks time_stamp,
56 const gfx::Vector2dF& offset, 56 const gfx::Vector2dF& offset,
57 bool discrete) = 0; 57 bool discrete) = 0;
58 58
59 // Called when a current kinetic scroll should be canceled.
60 virtual void OnPointerScrollCancel(base::TimeTicks time_stamp) = 0;
61
62 // Called when pointer scroll has stopped and a fling is happening (e.g. 59 // Called when pointer scroll has stopped and a fling is happening (e.g.
63 // lifting the fingers from the touchpad after scrolling quickly) 60 // lifting the fingers from the touchpad after scrolling quickly)
64 virtual void OnPointerScrollStop(base::TimeTicks time_stamp) = 0; 61 virtual void OnPointerScrollStop(base::TimeTicks time_stamp) = 0;
65 62
66 // Called after all pointer information of this frame has been set and the 63 // Called after all pointer information of this frame has been set and the
67 // client should evaluate the updated state. No events are being sent before 64 // client should evaluate the updated state. No events are being sent before
68 // this method is called. 65 // this method is called.
69 virtual void OnPointerFrame() = 0; 66 virtual void OnPointerFrame() = 0;
70 67
71 protected: 68 protected:
72 virtual ~PointerDelegate() {} 69 virtual ~PointerDelegate() {}
73 }; 70 };
74 71
75 } // namespace exo 72 } // namespace exo
76 73
77 #endif // COMPONENTS_EXO_POINTER_DELEGATE_H_ 74 #endif // COMPONENTS_EXO_POINTER_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/exo/pointer.cc ('k') | components/exo/pointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698