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

Side by Side Diff: ui/views/events/event.cc

Issue 9076002: Initial views touchui Gesture Recognizer support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win release build Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/events/event.h ('k') | ui/views/touchui/gesture_recognizer.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/views/events/event.h" 5 #include "ui/views/events/event.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/keycodes/keyboard_code_conversion.h" 8 #include "ui/base/keycodes/keyboard_code_conversion.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 #include "ui/views/widget/root_view.h" 10 #include "ui/views/widget/root_view.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // MouseWheelEvent, public: 194 // MouseWheelEvent, public:
195 195
196 #if defined(OS_WIN) 196 #if defined(OS_WIN)
197 // This value matches windows WHEEL_DELTA. 197 // This value matches windows WHEEL_DELTA.
198 // static 198 // static
199 const int MouseWheelEvent::kWheelDelta = 120; 199 const int MouseWheelEvent::kWheelDelta = 120;
200 #else 200 #else
201 // This value matches GTK+ wheel scroll amount. 201 // This value matches GTK+ wheel scroll amount.
202 const int MouseWheelEvent::kWheelDelta = 53; 202 const int MouseWheelEvent::kWheelDelta = 53;
203 #endif 203 #endif
204
205 ////////////////////////////////////////////////////////////////////////////////
206 // GestureEvent, public:
207
208 GestureEvent::GestureEvent(ui::EventType type,
209 int x,
210 int y,
211 int flags,
212 base::Time time_stamp,
213 float delta_x,
214 float delta_y)
215 : LocatedEvent(type, gfx::Point(x, y), flags),
216 delta_x_(delta_x),
217 delta_y_(delta_y) {
218 set_time_stamp(time_stamp);
219 }
220
221 GestureEvent::GestureEvent(const GestureEvent& model, View* source,
222 View* target)
223 : LocatedEvent(model, source, target),
224 delta_x_(model.delta_x_),
225 delta_y_(model.delta_y_) {
226 set_time_stamp(model.time_stamp());
227 }
228
229 ////////////////////////////////////////////////////////////////////////////////
230 // GestureEvent, private:
231
232 GestureEvent::GestureEvent(const GestureEvent& model, View* root)
233 : LocatedEvent(model, root),
234 delta_x_(model.delta_x_),
235 delta_y_(model.delta_y_) {
236 set_time_stamp(model.time_stamp());
237 }
238
204 } // namespace views 239 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/events/event.h ('k') | ui/views/touchui/gesture_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698