OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/system/touchpad_settings.h" | 5 #include "chrome/browser/chromeos/system/touchpad_settings.h" |
6 | 6 |
| 7 #include <string> |
| 8 #include <vector> |
| 9 |
7 #include "base/bind.h" | 10 #include "base/bind.h" |
8 #include "base/command_line.h" | 11 #include "base/command_line.h" |
9 #include "base/file_path.h" | 12 #include "base/file_path.h" |
10 #include "base/file_util.h" | 13 #include "base/file_util.h" |
11 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
12 #include "base/process_util.h" | 15 #include "base/process_util.h" |
13 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
14 #include "chrome/browser/chromeos/system/runtime_environment.h" | 17 #include "chrome/browser/chromeos/system/runtime_environment.h" |
15 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
16 | 19 |
17 using content::BrowserThread; | 20 using content::BrowserThread; |
18 | 21 |
19 namespace chromeos { | 22 namespace chromeos { |
20 namespace system { | 23 namespace system { |
| 24 |
21 namespace touchpad_settings { | 25 namespace touchpad_settings { |
22 namespace { | 26 namespace { |
23 const char* kTpControl = "/opt/google/touchpad/tpcontrol"; | 27 const char* kTpControl = "/opt/google/touchpad/tpcontrol"; |
24 | 28 |
25 bool TPCtrlExists() { | 29 bool TPCtrlExists() { |
26 return file_util::PathExists(FilePath(kTpControl)); | 30 return file_util::PathExists(FilePath(kTpControl)); |
27 } | 31 } |
28 | 32 |
29 // Launches the tpcontrol command asynchronously, if it exists. | 33 // Launches the tpcontrol command asynchronously, if it exists. |
30 void LaunchTpControl(const std::vector<std::string>& argv) { | 34 void LaunchTpControl(const std::vector<std::string>& argv) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 91 |
88 std::vector<std::string> argv; | 92 std::vector<std::string> argv; |
89 argv.push_back(kTpControl); | 93 argv.push_back(kTpControl); |
90 argv.push_back("taptoclick"); | 94 argv.push_back("taptoclick"); |
91 argv.push_back(enabled ? "on" : "off"); | 95 argv.push_back(enabled ? "on" : "off"); |
92 | 96 |
93 LaunchTpControl(argv); | 97 LaunchTpControl(argv); |
94 } | 98 } |
95 | 99 |
96 } // namespace touchpad_settings | 100 } // namespace touchpad_settings |
| 101 |
| 102 namespace mouse_settings { |
| 103 |
| 104 void SetPrimaryButtonRight(bool right) { |
| 105 // TODO(achuith, adlr): Call mouse_ctrl when it exists. |
| 106 } |
| 107 |
| 108 } // namespace mouse_settings |
| 109 |
97 } // namespace system | 110 } // namespace system |
98 } // namespace chromeos | 111 } // namespace chromeos |
OLD | NEW |