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

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

Issue 8364039: Initial views touchui GestureRecognizer support (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added GestureSignature enum type Created 9 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 | Annotate | Revision Log
« no previous file with comments | « views/events/event.h ('k') | 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 "views/events/event.h" 5 #include "views/events/event.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "views/view.h" 8 #include "views/view.h"
9 #include "views/widget/root_view.h" 9 #include "views/widget/root_view.h"
10 10
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 force_(model.force_) { 290 force_(model.force_) {
291 } 291 }
292 292
293 //////////////////////////////////////////////////////////////////////////////// 293 ////////////////////////////////////////////////////////////////////////////////
294 // MouseWheelEvent, public: 294 // MouseWheelEvent, public:
295 295
296 // This value matches windows WHEEL_DELTA. 296 // This value matches windows WHEEL_DELTA.
297 // static 297 // static
298 const int MouseWheelEvent::kWheelDelta = 120; 298 const int MouseWheelEvent::kWheelDelta = 120;
299 299
300 ////////////////////////////////////////////////////////////////////////////////
301 // GestureEvent, public:
302
303 GestureEvent::GestureEvent(ui::EventType type,
304 int x,
305 int y,
306 int flags,
307 base::Time time_stamp,
308 float delta_x,
309 float delta_y)
310 : LocatedEvent(type, gfx::Point(x, y), flags),
311 delta_x_(delta_x),
312 delta_y_(delta_y) {
313 set_time_stamp(time_stamp);
314 }
315
316 GestureEvent::GestureEvent(const GestureEvent& model, View* source,
317 View* target)
318 : LocatedEvent(model, source, target),
319 delta_x_(model.delta_x_),
320 delta_y_(model.delta_y_) {
321 set_time_stamp(model.time_stamp());
322 }
323
324 ////////////////////////////////////////////////////////////////////////////////
325 // GestureEvent, private:
326
327 GestureEvent::GestureEvent(const GestureEvent& model, View* root)
328 : LocatedEvent(model, root),
329 delta_x_(model.delta_x_),
330 delta_y_(model.delta_y_) {
331 set_time_stamp(model.time_stamp());
332 }
333
300 } // namespace views 334 } // namespace views
OLDNEW
« no previous file with comments | « views/events/event.h ('k') | views/touchui/gesture_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698