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

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

Issue 28513004: Move evdev events support into EventFactoryDelegateEvdev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
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 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_OZONE_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_OZONE_H_ 6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
7 7
8 #include <bitset> 8 #include <bitset>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/events/event_constants.h" 11 #include "ui/events/event_constants.h"
12 #include "ui/events/events_export.h" 12 #include "ui/events/events_export.h"
13 #include "ui/events/ozone/event_converter_ozone.h" 13 #include "ui/events/ozone/event_converter_ozone.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 class TouchEvent; 17 class TouchEvent;
18 18
19 class EVENTS_EXPORT TouchEventConverterOzone : public EventConverterOzone { 19 class EVENTS_EXPORT TouchEventConverterEvdev : public EventConverterOzone {
20 public: 20 public:
21 enum { 21 enum {
22 MAX_FINGERS = 11 22 MAX_FINGERS = 11
23 }; 23 };
24 TouchEventConverterOzone(int fd, int id); 24 TouchEventConverterEvdev(int fd, int id);
25 virtual ~TouchEventConverterOzone(); 25 virtual ~TouchEventConverterEvdev();
26 26
27 private: 27 private:
28 friend class MockTouchEventConverterOzone; 28 friend class MockTouchEventConverterEvdev;
29 29
30 // Unsafe part of initialization. 30 // Unsafe part of initialization.
31 void Init(); 31 void Init();
32 32
33 // Overidden from base::MessagePumpLibevent::Watcher. 33 // Overidden from base::MessagePumpLibevent::Watcher.
34 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; 34 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
35 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE; 35 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
36 36
37 // Pressure values. 37 // Pressure values.
38 int pressure_min_; 38 int pressure_min_;
(...skipping 27 matching lines...) Expand all
66 int finger_; // "Finger" id starting from 0; -1 means not active 66 int finger_; // "Finger" id starting from 0; -1 means not active
67 67
68 EventType type_; 68 EventType type_;
69 int major_; 69 int major_;
70 float pressure_; 70 float pressure_;
71 }; 71 };
72 72
73 // In-progress touch points. 73 // In-progress touch points.
74 InProgressEvents events_[MAX_FINGERS]; 74 InProgressEvents events_[MAX_FINGERS];
75 75
76 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterOzone); 76 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
77 }; 77 };
78 78
79 } // namespace ui 79 } // namespace ui
80 80
81 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_OZONE_H_ 81 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
82 82
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698