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

Unified Diff: chrome/browser/chromeos/cros/synaptics_library.h

Issue 1142005: Mocks for all libcros elements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/power_library.cc ('k') | chrome/browser/chromeos/cros/synaptics_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/synaptics_library.h
===================================================================
--- chrome/browser/chromeos/cros/synaptics_library.h (revision 42341)
+++ chrome/browser/chromeos/cros/synaptics_library.h (working copy)
@@ -10,33 +10,42 @@
namespace chromeos {
-// This class handles the interaction with the ChromeOS synaptics library APIs.
+// This interface defines 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();
-
+ virtual ~SynapticsLibrary() {}
// Sets a boolean parameter. The actual call will be run on the FILE thread.
- void SetBoolParameter(SynapticsParameter param, bool value);
+ virtual void SetBoolParameter(SynapticsParameter param, bool value) = 0;
// 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);
+ virtual void SetRangeParameter(SynapticsParameter param, int value) = 0;
+};
+
+// 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 SynapticsLibraryImpl : public SynapticsLibrary {
+ public:
+ SynapticsLibraryImpl() {}
+ virtual ~SynapticsLibraryImpl() {}
+
+ // SynapticsLibrary overrides.
+ virtual void SetBoolParameter(SynapticsParameter param, bool value);
+ virtual 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);
+ DISALLOW_COPY_AND_ASSIGN(SynapticsLibraryImpl);
};
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/cros/power_library.cc ('k') | chrome/browser/chromeos/cros/synaptics_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698