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

Side by Side Diff: ui/events/ozone/evdev/event_dispatch_callback.h

Issue 874713002: [PATCH 1/11] ozone: evdev: Move touch ui::Event transformation to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates for events_unittests Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h"
10 #include "ui/events/event_constants.h"
11 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/gfx/geometry/vector2d_f.h"
13
14 namespace base {
15 class TimeDelta;
16 }
17
18 namespace gfx {
19 class PointF;
20 class Vector2dF;
21 }
9 22
10 namespace ui { 23 namespace ui {
11 24
12 class Event; 25 class Event;
13 26
14 typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback; 27 typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback;
15 28
29 struct TouchEventParams {
30 TouchEventParams(int device_id,
31 int touch_id,
32 EventType type,
33 const gfx::PointF& location,
34 const gfx::Vector2dF& radii,
35 float pressure,
36 const base::TimeDelta& timestamp);
37 TouchEventParams(const TouchEventParams& other);
38 ~TouchEventParams();
39
40 int device_id;
41 int touch_id;
42 EventType type;
43 gfx::PointF location;
44 gfx::Vector2dF radii;
45 float pressure;
46 base::TimeDelta timestamp;
47 };
48
49 typedef base::Callback<void(const TouchEventParams& params)>
50 TouchEventDispatchCallback;
51
16 } // namspace ui 52 } // namspace ui
17 53
18 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 54 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698