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

Side by Side Diff: ui/events/ozone/evdev/tablet_event_converter_evdev.cc

Issue 790153005: ozone: evdev: Add property to identify internal or external devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 #include "ui/events/ozone/evdev/tablet_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/tablet_event_converter_evdev.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "ui/events/event.h" 11 #include "ui/events/event.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 TabletEventConverterEvdev::TabletEventConverterEvdev( 15 TabletEventConverterEvdev::TabletEventConverterEvdev(
16 int fd, 16 int fd,
17 base::FilePath path, 17 base::FilePath path,
18 int id, 18 int id,
19 InputDeviceType type,
19 EventModifiersEvdev* modifiers, 20 EventModifiersEvdev* modifiers,
20 CursorDelegateEvdev* cursor, 21 CursorDelegateEvdev* cursor,
21 const EventDeviceInfo& info, 22 const EventDeviceInfo& info,
22 const EventDispatchCallback& callback) 23 const EventDispatchCallback& callback)
23 : EventConverterEvdev(fd, path, id), 24 : EventConverterEvdev(fd, path, id, type),
24 cursor_(cursor), 25 cursor_(cursor),
25 modifiers_(modifiers), 26 modifiers_(modifiers),
26 callback_(callback), 27 callback_(callback),
27 stylus_(0), 28 stylus_(0),
28 abs_value_dirty_(false) { 29 abs_value_dirty_(false) {
29 x_abs_min_ = info.GetAbsMinimum(ABS_X); 30 x_abs_min_ = info.GetAbsMinimum(ABS_X);
30 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1; 31 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1;
31 y_abs_min_ = info.GetAbsMinimum(ABS_Y); 32 y_abs_min_ = info.GetAbsMinimum(ABS_Y);
32 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1; 33 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1;
33 } 34 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 165
165 callback_.Run(make_scoped_ptr( 166 callback_.Run(make_scoped_ptr(
166 new MouseEvent(ui::ET_MOUSE_MOVED, cursor_->GetLocation(), 167 new MouseEvent(ui::ET_MOUSE_MOVED, cursor_->GetLocation(),
167 cursor_->GetLocation(), modifiers_->GetModifierFlags(), 168 cursor_->GetLocation(), modifiers_->GetModifierFlags(),
168 /* changed_button_flags */ 0))); 169 /* changed_button_flags */ 0)));
169 170
170 abs_value_dirty_ = false; 171 abs_value_dirty_ = false;
171 } 172 }
172 173
173 } // namespace ui 174 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/tablet_event_converter_evdev.h ('k') | ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698