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

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

Issue 1048333005: ozone: Map TouchEvent::touch_id_ into expected range (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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_TOUCH_EVENT_CONVERTER_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_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"
(...skipping 19 matching lines...) Expand all
30 base::FilePath path, 30 base::FilePath path,
31 int id, 31 int id,
32 InputDeviceType type, 32 InputDeviceType type,
33 DeviceEventDispatcherEvdev* dispatcher); 33 DeviceEventDispatcherEvdev* dispatcher);
34 ~TouchEventConverterEvdev() override; 34 ~TouchEventConverterEvdev() override;
35 35
36 // EventConverterEvdev: 36 // EventConverterEvdev:
37 bool HasTouchscreen() const override; 37 bool HasTouchscreen() const override;
38 gfx::Size GetTouchscreenSize() const override; 38 gfx::Size GetTouchscreenSize() const override;
39 int GetTouchPoints() const override; 39 int GetTouchPoints() const override;
40 void SetTouchIdOffset(int offset) override;
40 41
41 // Unsafe part of initialization. 42 // Unsafe part of initialization.
42 virtual void Initialize(const EventDeviceInfo& info); 43 virtual void Initialize(const EventDeviceInfo& info);
43 44
44 private: 45 private:
45 friend class MockTouchEventConverterEvdev; 46 friend class MockTouchEventConverterEvdev;
46 47
47 // Overidden from base::MessagePumpLibevent::Watcher. 48 // Overidden from base::MessagePumpLibevent::Watcher.
48 void OnFileCanReadWithoutBlocking(int fd) override; 49 void OnFileCanReadWithoutBlocking(int fd) override;
49 50
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 93
93 // Number of touch points reported by driver 94 // Number of touch points reported by driver
94 int touch_points_; 95 int touch_points_;
95 96
96 // Tracking id counter. 97 // Tracking id counter.
97 int next_tracking_id_; 98 int next_tracking_id_;
98 99
99 // Touch point currently being updated from the /dev/input/event* stream. 100 // Touch point currently being updated from the /dev/input/event* stream.
100 size_t current_slot_; 101 size_t current_slot_;
101 102
103 // Offset to apply for this touch device to give unique event touch_ids.
104 int touch_id_offset_;
105
102 // In-progress touch points. 106 // In-progress touch points.
103 std::vector<InProgressTouchEvdev> events_; 107 std::vector<InProgressTouchEvdev> events_;
104 108
105 // Finds touch noise. 109 // Finds touch noise.
106 scoped_ptr<TouchNoiseFinder> touch_noise_finder_; 110 scoped_ptr<TouchNoiseFinder> touch_noise_finder_;
107 111
108 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); 112 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
109 }; 113 };
110 114
111 } // namespace ui 115 } // namespace ui
112 116
113 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ 117 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698