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

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

Issue 1155543002: ozone: Use DeviceCapabilities in TabletEventConverterEvdev unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc » ('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 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"
(...skipping 13 matching lines...) Expand all
24 DeviceEventDispatcherEvdev* dispatcher) 24 DeviceEventDispatcherEvdev* dispatcher)
25 : EventConverterEvdev(fd, 25 : EventConverterEvdev(fd,
26 path, 26 path,
27 id, 27 id,
28 type, 28 type,
29 info.name(), 29 info.name(),
30 info.vendor_id(), 30 info.vendor_id(),
31 info.product_id()), 31 info.product_id()),
32 cursor_(cursor), 32 cursor_(cursor),
33 dispatcher_(dispatcher), 33 dispatcher_(dispatcher),
34 y_abs_location_(0),
35 x_abs_location_(0),
34 stylus_(0), 36 stylus_(0),
35 abs_value_dirty_(false) { 37 abs_value_dirty_(false) {
36 x_abs_min_ = info.GetAbsMinimum(ABS_X); 38 x_abs_min_ = info.GetAbsMinimum(ABS_X);
37 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1; 39 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1;
38 y_abs_min_ = info.GetAbsMinimum(ABS_Y); 40 y_abs_min_ = info.GetAbsMinimum(ABS_Y);
39 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1; 41 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1;
40 } 42 }
41 43
42 TabletEventConverterEvdev::~TabletEventConverterEvdev() { 44 TabletEventConverterEvdev::~TabletEventConverterEvdev() {
43 Stop(); 45 Stop();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 UpdateCursor(); 178 UpdateCursor();
177 179
178 dispatcher_->DispatchMouseMoveEvent( 180 dispatcher_->DispatchMouseMoveEvent(
179 MouseMoveEventParams(input_device_.id, cursor_->GetLocation(), 181 MouseMoveEventParams(input_device_.id, cursor_->GetLocation(),
180 TimeDeltaFromInputEvent(input))); 182 TimeDeltaFromInputEvent(input)));
181 183
182 abs_value_dirty_ = false; 184 abs_value_dirty_ = false;
183 } 185 }
184 186
185 } // namespace ui 187 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | 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