Index: chrome/browser/ui/webui/settings/chromeos/keyboard_handler.h |
diff --git a/chrome/browser/ui/webui/settings/chromeos/keyboard_handler.h b/chrome/browser/ui/webui/settings/chromeos/keyboard_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..00301f63c64d8f5364de44a948322f78376a4527 |
--- /dev/null |
+++ b/chrome/browser/ui/webui/settings/chromeos/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_KEYBOARD_HANDLER_H_ |
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_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: |
dschuyler
2016/03/02 01:08:06
I've been told to use period at the end of the com
michaelpg
2016/03/02 02:42:06
The stronger argument is that the line above uses
|
+ 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_KEYBOARD_HANDLER_H_ |