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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/system_options_handler.h

Issue 8965070: Change system settings based on when mouse/touchpad is connected/disconnected. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
Index: chrome/browser/ui/webui/options2/chromeos/system_options_handler.h
===================================================================
--- chrome/browser/ui/webui/options2/chromeos/system_options_handler.h (revision 115229)
+++ chrome/browser/ui/webui/options2/chromeos/system_options_handler.h (working copy)
@@ -8,6 +8,7 @@
#include "base/memory/weak_ptr.h"
#include "base/compiler_specific.h"
+#include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h"
#include "chrome/browser/ui/webui/options2/options_ui2.h"
namespace base {
@@ -17,6 +18,7 @@
// ChromeOS system options page UI handler.
class SystemOptionsHandler
: public OptionsPage2UIHandler,
+ public chromeos::XInputHierarchyChangedEventListener::Observer,
public base::SupportsWeakPtr<SystemOptionsHandler> {
public:
SystemOptionsHandler();
@@ -29,6 +31,9 @@
virtual void RegisterMessages() OVERRIDE;
+ // XInputHierarchyChangedEventListener implementation.
+ virtual void DeviceChanged() OVERRIDE;
+
// Called when the accessibility checkbox value is changed.
// |args| will contain the checkbox checked state as a string
// ("true" or "false").
@@ -41,8 +46,13 @@
void IncreaseScreenBrightnessCallback(const base::ListValue* args);
private:
- // Callback for TouchpadHelper.
+ // Check for input devices.
+ void CheckTouchpadExists();
+ void CheckMouseExists();
+
+ // Callback for input device checks.
void TouchpadExists(bool* exists);
+ void MouseExists(bool* exists);
DISALLOW_COPY_AND_ASSIGN(SystemOptionsHandler);
};

Powered by Google App Engine
This is Rietveld 408576698