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

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

Issue 1753653002: MD Settings: First half of Device > Keyboard sub-page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed one Created 4 years, 10 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_keyboard_handler.h
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h b/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ea6cbf04a4f19daebf535157e0f0b23de4c823c
--- /dev/null
+++ b/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.h
@@ -0,0 +1,55 @@
+// 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_KEYBOARD_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_KEYBOARD_HANDLER_H_
+
+#include "base/macros.h"
+#include "chrome/browser/ui/webui/settings/md_settings_ui.h"
+#include "ui/events/devices/input_device_event_observer.h"
+
+namespace base {
+class ListValue;
+}
+
+namespace content {
+class WebUI;
+}
+
+class Profile;
+
+namespace chromeos {
+namespace settings {
+
+// Chrome OS "Keyboard" settings page UI handler.
+class KeyboardHandler
+ : public ::settings::SettingsPageUIHandler,
+ public ui::InputDeviceEventObserver {
+ public:
+ explicit KeyboardHandler(content::WebUI* webui);
+ ~KeyboardHandler() override;
+
+ // SettingsPageUIHandler implementation.
+ void RegisterMessages() override;
+
+ // ui::InputDeviceEventObserver implementation.
+ void OnKeyboardDeviceConfigurationChanged() override;
+
+ private:
+ // Initializes the page with the current keyboard information.
+ void HandleInitialize(const base::ListValue* args);
+
+ // Shows or hides the Caps Lock and Diamond key settings based on whether the
+ // system status.
+ void UpdateShowKeys() const;
+
+ Profile* profile_; // Weak pointer.
+
+ DISALLOW_COPY_AND_ASSIGN(KeyboardHandler);
+};
+
+} // namespace settings
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_KEYBOARD_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698