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

Side by Side Diff: ui/aura/event.cc

Issue 9773024: This patch implements Chromium's Aura gesture recognizer in terms of utouch-grail and utouch-frame … (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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 | « ui/aura/event.h ('k') | ui/aura/gestures/apple_magic_trackpad/device.prop » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/aura/event.h" 5 #include "ui/aura/event.h"
6 6
7 #if defined(USE_X11) 7 #if defined(USE_X11)
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #endif 9 #endif
10 10
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 ScrollEvent::ScrollEvent(const base::NativeEvent& native_event) 369 ScrollEvent::ScrollEvent(const base::NativeEvent& native_event)
370 : MouseEvent(native_event) { 370 : MouseEvent(native_event) {
371 ui::GetScrollOffsets(native_event, &x_offset_, &y_offset_); 371 ui::GetScrollOffsets(native_event, &x_offset_, &y_offset_);
372 } 372 }
373 373
374 GestureEvent::GestureEvent(ui::EventType type, 374 GestureEvent::GestureEvent(ui::EventType type,
375 int x, 375 int x,
376 int y, 376 int y,
377 int flags, 377 int flags,
378 base::Time time_stamp, 378 base::Time time_stamp,
379 float delta_x, 379 const GestureEvent::Properties& properties)
380 float delta_y)
381 : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags), 380 : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags),
382 delta_x_(delta_x), 381 properties_(properties) {
383 delta_y_(delta_y) {
384 // XXX: Why is aura::Event::time_stamp_ a TimeDelta instead of a Time? 382 // XXX: Why is aura::Event::time_stamp_ a TimeDelta instead of a Time?
385 set_time_stamp(base::TimeDelta::FromSeconds(time_stamp.ToDoubleT())); 383 set_time_stamp(base::TimeDelta::FromSeconds(time_stamp.ToDoubleT()));
386 } 384 }
387 385
388 GestureEvent::GestureEvent(const GestureEvent& model, 386 GestureEvent::GestureEvent(const GestureEvent& model,
389 Window* source, 387 Window* source,
390 Window* target) 388 Window* target)
391 : LocatedEvent(model, source, target), 389 : LocatedEvent(model, source, target),
392 delta_x_(model.delta_x_), 390 properties_(model.properties_) {
393 delta_y_(model.delta_y_) {
394 } 391 }
395 392
396 } // namespace aura 393 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/event.h ('k') | ui/aura/gestures/apple_magic_trackpad/device.prop » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698