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

Side by Side Diff: ui/aura/window_tree_host_x11.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 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
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/cocoa/remote_layer_api.mm » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/aura/window_tree_host_x11.h" 5 #include "ui/aura/window_tree_host_x11.h"
6 6
7 #include <strings.h> 7 #include <strings.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/extensions/Xrandr.h> 10 #include <X11/extensions/Xrandr.h>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // routes all the touch events to the X root window, 109 // routes all the touch events to the X root window,
110 // where they can be calibrated later. 110 // where they can be calibrated later.
111 // 2. Has the Calibrate method that does the actual bezel calibration, 111 // 2. Has the Calibrate method that does the actual bezel calibration,
112 // when invoked from X root window's event dispatcher. 112 // when invoked from X root window's event dispatcher.
113 class TouchEventCalibrate : public ui::PlatformEventObserver { 113 class TouchEventCalibrate : public ui::PlatformEventObserver {
114 public: 114 public:
115 TouchEventCalibrate() : left_(0), right_(0), top_(0), bottom_(0) { 115 TouchEventCalibrate() : left_(0), right_(0), top_(0), bottom_(0) {
116 if (ui::PlatformEventSource::GetInstance()) 116 if (ui::PlatformEventSource::GetInstance())
117 ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this); 117 ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this);
118 std::vector<std::string> parts; 118 std::vector<std::string> parts;
119 if (Tokenize(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 119 if (Tokenize(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
120 switches::kTouchCalibration), 120 switches::kTouchCalibration),
121 ",", 121 ",", &parts) >= 4) {
122 &parts) >= 4) {
123 if (!base::StringToInt(parts[0], &left_)) 122 if (!base::StringToInt(parts[0], &left_))
124 DLOG(ERROR) << "Incorrect left border calibration value passed."; 123 DLOG(ERROR) << "Incorrect left border calibration value passed.";
125 if (!base::StringToInt(parts[1], &right_)) 124 if (!base::StringToInt(parts[1], &right_))
126 DLOG(ERROR) << "Incorrect right border calibration value passed."; 125 DLOG(ERROR) << "Incorrect right border calibration value passed.";
127 if (!base::StringToInt(parts[2], &top_)) 126 if (!base::StringToInt(parts[2], &top_))
128 DLOG(ERROR) << "Incorrect top border calibration value passed."; 127 DLOG(ERROR) << "Incorrect top border calibration value passed.";
129 if (!base::StringToInt(parts[3], &bottom_)) 128 if (!base::StringToInt(parts[3], &bottom_))
130 DLOG(ERROR) << "Incorrect bottom border calibration value passed."; 129 DLOG(ERROR) << "Incorrect bottom border calibration value passed.";
131 } 130 }
132 } 131 }
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 686 }
688 687
689 namespace test { 688 namespace test {
690 689
691 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { 690 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {
692 default_override_redirect = override_redirect; 691 default_override_redirect = override_redirect;
693 } 692 }
694 693
695 } // namespace test 694 } // namespace test
696 } // namespace aura 695 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/cocoa/remote_layer_api.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698