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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h

Issue 2110833003: MD Settings: Add mouse settings, update pointer settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PointersFake
Patch Set: rebase Created 4 years, 5 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/ui/webui/settings/chromeos/device_pointer_handler.h
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h b/chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..25f54393c738a80e64faf0dcd0f20b0a98da9c1f
--- /dev/null
+++ b/chrome/browser/ui/webui/settings/chromeos/device_pointer_handler.h
@@ -0,0 +1,51 @@
+// Copyright 2016 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_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_POINTER_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_POINTER_HANDLER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "chrome/browser/chromeos/system/pointer_device_observer.h"
+#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
+
+namespace base {
+class ListValue;
+}
+
+namespace chromeos {
+namespace settings {
+
+// Chrome OS "Mouse and touchpad" settings page UI handler.
+class PointerHandler
+ : public ::settings::SettingsPageUIHandler,
+ public chromeos::system::PointerDeviceObserver::Observer {
+ public:
+ PointerHandler();
+ ~PointerHandler() override;
+
+ // SettingsPageUIHandler implementation.
+ void RegisterMessages() override;
+ void OnJavascriptAllowed() override;
+ void OnJavascriptDisallowed() override;
+
+ private:
+ // PointerDeviceObserver implementation.
+ void TouchpadExists(bool exists) override;
+ void MouseExists(bool exists) override;
+
+ // Initializes the page with the current pointer information.
+ void HandleInitialize(const base::ListValue* args);
+
+ std::unique_ptr<chromeos::system::PointerDeviceObserver>
+ pointer_device_observer_;
+
+ DISALLOW_COPY_AND_ASSIGN(PointerHandler);
+};
+
+} // namespace settings
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_POINTER_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698