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

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

Issue 312393002: ozone: Move the factory interfaces into a common target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r278697 Created 6 years, 6 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 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/touch_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/input.h> 9 #include <linux/input.h>
10 #include <poll.h> 10 #include <poll.h>
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <unistd.h> 12 #include <unistd.h>
13 13
14 #include <cmath> 14 #include <cmath>
15 #include <limits> 15 #include <limits>
16 16
17 #include "base/bind.h" 17 #include "base/bind.h"
18 #include "base/callback.h" 18 #include "base/callback.h"
19 #include "base/command_line.h" 19 #include "base/command_line.h"
20 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/memory/scoped_vector.h" 21 #include "base/memory/scoped_vector.h"
22 #include "base/message_loop/message_loop.h" 22 #include "base/message_loop/message_loop.h"
23 #include "base/strings/string_number_conversions.h" 23 #include "base/strings/string_number_conversions.h"
24 #include "base/strings/string_util.h" 24 #include "base/strings/string_util.h"
25 #include "base/strings/stringprintf.h" 25 #include "base/strings/stringprintf.h"
26 #include "ui/events/event.h" 26 #include "ui/events/event.h"
27 #include "ui/events/event_constants.h" 27 #include "ui/events/event_constants.h"
28 #include "ui/events/event_switches.h" 28 #include "ui/events/event_switches.h"
29 #include "ui/events/ozone/event_factory_ozone.h"
30 #include "ui/gfx/screen.h" 29 #include "ui/gfx/screen.h"
30 #include "ui/ozone/public/event_factory_ozone.h"
31 31
32 namespace { 32 namespace {
33 33
34 // Number is determined empirically. 34 // Number is determined empirically.
35 // TODO(rjkroege): Configure this per device. 35 // TODO(rjkroege): Configure this per device.
36 const float kFingerWidth = 25.f; 36 const float kFingerWidth = 25.f;
37 37
38 struct TouchCalibration { 38 struct TouchCalibration {
39 int bezel_left; 39 int bezel_left;
40 int bezel_right; 40 int bezel_right;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 // Subsequent events for this finger will be touch-move until it 299 // Subsequent events for this finger will be touch-move until it
300 // is released. 300 // is released.
301 events_[i].type_ = ET_TOUCH_MOVED; 301 events_[i].type_ = ET_TOUCH_MOVED;
302 } 302 }
303 } 303 }
304 altered_slots_.reset(); 304 altered_slots_.reset();
305 } 305 }
306 306
307 } // namespace ui 307 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/key_event_converter_evdev.cc ('k') | ui/events/ozone/event_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698