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

Unified Diff: chrome/browser/chromeos/system/device_change_handler.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: GetDefaultProfile 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
Index: chrome/browser/chromeos/system/device_change_handler.h
===================================================================
--- chrome/browser/chromeos/system/device_change_handler.h (revision 0)
+++ chrome/browser/chromeos/system/device_change_handler.h (revision 0)
@@ -0,0 +1,33 @@
+// Copyright (c) 2013 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_SYSTEM_DEVICE_CHANGE_HANDLER_H_
+#define CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_CHANGE_HANDLER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/chromeos/system/pointer_device_observer.h"
+
+namespace chromeos {
+namespace system {
+
+// Observes changes in device hierarchy. When a new touchpad/mouse is attached,
+// applies the last used profile's touchpad/mouse settings to the system.
+class DeviceChangeHandler : public PointerDeviceObserver::Observer {
+ public:
+ DeviceChangeHandler();
+ virtual ~DeviceChangeHandler();
+
+ private:
+ // PointerDeviceObserver::Observer implementation.
+ virtual void TouchpadExists(bool exists) OVERRIDE;
+ virtual void MouseExists(bool exists) OVERRIDE;
+
+ scoped_ptr<PointerDeviceObserver> pointer_device_observer_;
+};
+
+} // namespace system
+} // namesspace chromeos
+
+
+#endif // CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_CHANGE_HANDLER_H_
« no previous file with comments | « chrome/browser/chromeos/login/login_display_host_impl.cc ('k') | chrome/browser/chromeos/system/device_change_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698