summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/synaptics_library.h
diff options
context:
space:
mode:
authorchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 20:01:35 +0000
committerchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 20:01:35 +0000
commitc31b3c720e5a7ea430cfeb3361f4ff44f358f9e9 (patch)
treebd4012cbc0d8a9ec61791b29316b94554becd5db /chrome/browser/chromeos/synaptics_library.h
parent6806d48ab1ce1f7dc3104033467581959368c28e (diff)
downloadchromium_src-c31b3c720e5a7ea430cfeb3361f4ff44f358f9e9.zip
chromium_src-c31b3c720e5a7ea430cfeb3361f4ff44f358f9e9.tar.gz
chromium_src-c31b3c720e5a7ea430cfeb3361f4ff44f358f9e9.tar.bz2
Switch to use libcros to make changes to touchpad settings.
BUG=none TEST=none Review URL: http://codereview.chromium.org/300011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/synaptics_library.h')
-rw-r--r--chrome/browser/chromeos/synaptics_library.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/synaptics_library.h b/chrome/browser/chromeos/synaptics_library.h
new file mode 100644
index 0000000..af15a49
--- /dev/null
+++ b/chrome/browser/chromeos/synaptics_library.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_SYNAPTICS_LIBRARY_H_
+#define CHROME_BROWSER_CHROMEOS_SYNAPTICS_LIBRARY_H_
+
+#include "base/singleton.h"
+#include "third_party/cros/chromeos_synaptics.h"
+
+namespace chromeos {
+
+// This class handles the interaction with the ChromeOS synaptics library APIs.
+// Users can get an instance of this library class like this:
+// SynapticsLibrary::Get()
+// For a list of SynapticsPrameters, see third_party/cros/chromeos_synaptics.h
+class SynapticsLibrary {
+ public:
+ // This gets the singleton SynapticsLibrary.
+ static SynapticsLibrary* Get();
+
+ // Returns true if the ChromeOS library was loaded.
+ static bool loaded();
+
+ // Sets a boolean parameter. The actual call will be run on the FILE thread.
+ void SetBoolParameter(SynapticsParameter param, bool value);
+
+ // Sets a range parameter. The actual call will be run on the FILE thread.
+ // Value should be between 1 and 10 inclusive.
+ void SetRangeParameter(SynapticsParameter param, int value);
+
+ private:
+ friend struct DefaultSingletonTraits<SynapticsLibrary>;
+
+ SynapticsLibrary() {}
+ ~SynapticsLibrary() {}
+
+ // This helper methods calls into the libcros library to set the parameter.
+ // This call is run on the FILE thread.
+ void SetParameter(SynapticsParameter param, int value);
+
+ DISALLOW_COPY_AND_ASSIGN(SynapticsLibrary);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_SYNAPTICS_LIBRARY_H_