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

Side by Side Diff: ui/events/ozone/events_ozone.cc

Issue 471163004: ozone: Implement GetFlingData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698