OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "ui/events/event.h" | 5 #include "ui/events/event.h" |
6 #include "ui/events/event_constants.h" | 6 #include "ui/events/event_constants.h" |
7 #include "ui/events/event_utils.h" | 7 #include "ui/events/event_utils.h" |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 NOTIMPLEMENTED(); | 134 NOTIMPLEMENTED(); |
135 return false; | 135 return false; |
136 } | 136 } |
137 | 137 |
138 bool GetFlingData(const base::NativeEvent& native_event, | 138 bool GetFlingData(const base::NativeEvent& native_event, |
139 float* vx, | 139 float* vx, |
140 float* vy, | 140 float* vy, |
141 float* vx_ordinal, | 141 float* vx_ordinal, |
142 float* vy_ordinal, | 142 float* vy_ordinal, |
143 bool* is_cancel) { | 143 bool* is_cancel) { |
144 NOTIMPLEMENTED(); | 144 const ui::ScrollEvent* event = |
145 return false; | 145 static_cast<const ui::ScrollEvent*>(native_event); |
| 146 DCHECK(event->IsScrollEvent()); |
| 147 *vx = event->x_offset(); |
| 148 *vy = event->y_offset(); |
| 149 *vx_ordinal = event->x_offset_ordinal(); |
| 150 *vy_ordinal = event->y_offset_ordinal(); |
| 151 *is_cancel = event->type() == ET_SCROLL_FLING_CANCEL; |
| 152 return true; |
146 } | 153 } |
147 | 154 |
148 int GetModifiersFromKeyState() { | 155 int GetModifiersFromKeyState() { |
149 NOTIMPLEMENTED(); | 156 NOTIMPLEMENTED(); |
150 return 0; | 157 return 0; |
151 } | 158 } |
152 | 159 |
153 } // namespace ui | 160 } // namespace ui |
OLD | NEW |