1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KEYBOARD_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KEYBOARD_HANDLER_H_
8 #include "base/compiler_specific.h"
9 #include "base/prefs/pref_member.h"
10 #include "chrome/browser/ui/webui/options/options_ui.h"
11 #include "ui/events/devices/input_device_event_observer.h"
16 // Customize modifier keys overlay page UI handler.
18 : public ::options::OptionsPageUIHandler
,
19 public ui::InputDeviceEventObserver
{
22 ~KeyboardHandler() override
;
24 // OptionsPageUIHandler implementation.
25 void GetLocalizedValues(base::DictionaryValue
* localized_strings
) override
;
26 void InitializePage() override
;
27 void RegisterMessages() override
;
29 // ui::InputDeviceEventObserver:
30 void OnKeyboardDeviceConfigurationChanged() override
;
33 // Show the keyboard shortcuts overlay from the options page.
34 void HandleShowKeyboardShortcuts(const base::ListValue
* args
);
36 // Shows or hides the CapsLock options based on whether or not there is an
37 // external keyboard connected.
38 void UpdateCapsLockOptions() const;
40 DISALLOW_COPY_AND_ASSIGN(KeyboardHandler
);
43 } // namespace options
44 } // namespace chromeos
46 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KEYBOARD_HANDLER_H_