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

Unified Diff: chrome/browser/chromeos/preferences.h

Issue 15381003: Use helper DeviceChangeHandler to call mousecontrol/tpcontrol whenever a device is attached. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | « no previous file | chrome/browser/chromeos/preferences.cc » ('j') | chrome/browser/chromeos/preferences.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/preferences.h
===================================================================
--- chrome/browser/chromeos/preferences.h (revision 200880)
+++ chrome/browser/chromeos/preferences.h (working copy)
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/prefs/pref_member.h"
#include "chrome/browser/chromeos/language_preferences.h"
+#include "chrome/browser/chromeos/system/pointer_device_observer.h"
#include "chrome/browser/prefs/pref_service_syncable_observer.h"
class PrefRegistrySimple;
@@ -31,7 +32,8 @@
// is first initialized, it will initialize the OS settings to what's stored in
// the preferences. These include touchpad settings, etc.
// When the preferences change, we change the settings to reflect the new value.
-class Preferences : public PrefServiceSyncableObserver {
+class Preferences : public PrefServiceSyncableObserver,
+ public system::PointerDeviceObserver::Observer {
public:
Preferences();
explicit Preferences(
@@ -103,12 +105,21 @@
// on the cmd line.
void ForceNaturalScrollDefault();
+ // Helpers for preference changes for mouse and touchpad settings.
+ void SetTouchpadPrefs(const std::string* pref_name);
+ void SetMousePrefs(const std::string* pref_name);
+
// PrefServiceSyncableObserver implementation.
virtual void OnIsSyncingChanged() OVERRIDE;
+ // PointerDeviceObserver::Observer implementation.
+ virtual void TouchpadExists(bool exists) OVERRIDE;
+ virtual void MouseExists(bool exists) OVERRIDE;
+
PrefServiceSyncable* prefs_;
input_method::InputMethodManager* input_method_manager_;
+ scoped_ptr<system::PointerDeviceObserver> pointer_device_observer_;
BooleanPrefMember tap_to_click_enabled_;
BooleanPrefMember tap_dragging_enabled_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/preferences.cc » ('j') | chrome/browser/chromeos/preferences.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698