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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 std::vector<std::string> argv; | 31 std::vector<std::string> argv; |
32 argv.push_back(kTpControl); | 32 argv.push_back(kTpControl); |
33 argv.push_back("sensitivity"); | 33 argv.push_back("sensitivity"); |
34 argv.push_back(StringPrintf("%d", value)); | 34 argv.push_back(StringPrintf("%d", value)); |
35 | 35 |
36 base::LaunchOptions options; | 36 base::LaunchOptions options; |
37 options.wait = false; // Launch asynchronously. | 37 options.wait = false; // Launch asynchronously. |
38 | 38 |
39 base::LaunchProcess(CommandLine(argv), options); | 39 base::LaunchProcess(CommandLine(argv), options, NULL); |
40 } | 40 } |
41 | 41 |
42 void SetTapToClick(bool enabled) { | 42 void SetTapToClick(bool enabled) { |
43 // Run this on the FILE thread. | 43 // Run this on the FILE thread. |
44 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { | 44 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { |
45 BrowserThread::PostTask( | 45 BrowserThread::PostTask( |
46 BrowserThread::FILE, FROM_HERE, | 46 BrowserThread::FILE, FROM_HERE, |
47 base::Bind(&SetTapToClick, enabled)); | 47 base::Bind(&SetTapToClick, enabled)); |
48 return; | 48 return; |
49 } | 49 } |
50 | 50 |
51 std::vector<std::string> argv; | 51 std::vector<std::string> argv; |
52 argv.push_back(kTpControl); | 52 argv.push_back(kTpControl); |
53 argv.push_back("taptoclick"); | 53 argv.push_back("taptoclick"); |
54 argv.push_back(enabled ? "on" : "off"); | 54 argv.push_back(enabled ? "on" : "off"); |
55 | 55 |
56 base::LaunchOptions options; | 56 base::LaunchOptions options; |
57 options.wait = false; // Launch asynchronously. | 57 options.wait = false; // Launch asynchronously. |
58 | 58 |
59 base::LaunchProcess(CommandLine(argv), options); | 59 base::LaunchProcess(CommandLine(argv), options, NULL); |
60 } | 60 } |
61 | 61 |
62 } // namespace touchpad_settings | 62 } // namespace touchpad_settings |
63 } // namespace system | 63 } // namespace system |
64 } // namespace chromeos | 64 } // namespace chromeos |
OLD | NEW |