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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/system_options_handler2.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: rebase 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_handler2.h
===================================================================
--- chrome/browser/ui/webui/options2/chromeos/system_options_handler2.h (revision 115428)
+++ chrome/browser/ui/webui/options2/chromeos/system_options_handler2.h (working copy)
@@ -8,6 +8,7 @@
#include "base/memory/weak_ptr.h"
#include "base/compiler_specific.h"
+#include "chrome/browser/chromeos/device_hierarchy_observer.h"
#include "chrome/browser/ui/webui/options2/options_ui2.h"
namespace base {
@@ -19,6 +20,7 @@
// ChromeOS system options page UI handler.
class SystemOptionsHandler
: public OptionsPageUIHandler,
+ public chromeos::DeviceHierarchyObserver,
public base::SupportsWeakPtr<SystemOptionsHandler> {
public:
SystemOptionsHandler();
@@ -31,6 +33,9 @@
virtual void RegisterMessages() OVERRIDE;
+ // DeviceHierarchyObserver implementation.
+ virtual void DeviceHierarchyChanged() OVERRIDE;
+
// Called when the accessibility checkbox value is changed.
// |args| will contain the checkbox checked state as a string
// ("true" or "false").
@@ -43,8 +48,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