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

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

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 | « ui/events/gesture_detection/gesture_configuration_aura.cc ('k') | ui/gfx/display.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/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>
(...skipping 22 matching lines...) Expand all
33 33
34 struct TouchCalibration { 34 struct TouchCalibration {
35 int bezel_left; 35 int bezel_left;
36 int bezel_right; 36 int bezel_right;
37 int bezel_top; 37 int bezel_top;
38 int bezel_bottom; 38 int bezel_bottom;
39 }; 39 };
40 40
41 void GetTouchCalibration(TouchCalibration* cal) { 41 void GetTouchCalibration(TouchCalibration* cal) {
42 std::vector<std::string> parts; 42 std::vector<std::string> parts;
43 if (Tokenize(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 43 if (Tokenize(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
44 switches::kTouchCalibration), 44 switches::kTouchCalibration),
45 ",", 45 ",", &parts) >= 4) {
46 &parts) >= 4) {
47 if (!base::StringToInt(parts[0], &cal->bezel_left)) 46 if (!base::StringToInt(parts[0], &cal->bezel_left))
48 DLOG(ERROR) << "Incorrect left border calibration value passed."; 47 DLOG(ERROR) << "Incorrect left border calibration value passed.";
49 if (!base::StringToInt(parts[1], &cal->bezel_right)) 48 if (!base::StringToInt(parts[1], &cal->bezel_right))
50 DLOG(ERROR) << "Incorrect right border calibration value passed."; 49 DLOG(ERROR) << "Incorrect right border calibration value passed.";
51 if (!base::StringToInt(parts[2], &cal->bezel_top)) 50 if (!base::StringToInt(parts[2], &cal->bezel_top))
52 DLOG(ERROR) << "Incorrect top border calibration value passed."; 51 DLOG(ERROR) << "Incorrect top border calibration value passed.";
53 if (!base::StringToInt(parts[3], &cal->bezel_bottom)) 52 if (!base::StringToInt(parts[3], &cal->bezel_bottom))
54 DLOG(ERROR) << "Incorrect bottom border calibration value passed."; 53 DLOG(ERROR) << "Incorrect bottom border calibration value passed.";
55 } 54 }
56 } 55 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 300
302 // Subsequent events for this finger will be touch-move until it 301 // Subsequent events for this finger will be touch-move until it
303 // is released. 302 // is released.
304 events_[i].type_ = ET_TOUCH_MOVED; 303 events_[i].type_ = ET_TOUCH_MOVED;
305 } 304 }
306 } 305 }
307 altered_slots_.reset(); 306 altered_slots_.reset();
308 } 307 }
309 308
310 } // namespace ui 309 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_configuration_aura.cc ('k') | ui/gfx/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698