OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chromeos/chromeos_switches.h" | 9 #include "chromeos/chromeos_switches.h" |
10 #include "chromeos/ime/xkeyboard.h" | 10 #include "chromeos/ime/xkeyboard.h" |
11 #include "content/public/browser/web_ui.h" | 11 #include "content/public/browser/web_ui.h" |
12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 const struct ModifierKeysSelectItem { | 16 const struct ModifierKeysSelectItem { |
17 int message_id; | 17 int message_id; |
18 chromeos::input_method::ModifierKey value; | 18 chromeos::input_method::ModifierKey value; |
19 } kModifierKeysSelectItems[] = { | 19 } kModifierKeysSelectItems[] = { |
20 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_SEARCH, | 20 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_SEARCH, |
21 chromeos::input_method::kSearchKey }, | 21 chromeos::input_method::kSearchKey }, |
22 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_CTRL, | 22 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_CTRL, |
23 chromeos::input_method::kControlKey }, | 23 chromeos::input_method::kControlKey }, |
24 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_ALT, | 24 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_ALT, |
25 chromeos::input_method::kAltKey }, | 25 chromeos::input_method::kAltKey }, |
26 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_VOID, | 26 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_VOID, |
27 chromeos::input_method::kVoidKey }, | 27 chromeos::input_method::kVoidKey }, |
28 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_CAPS_LOCK, | 28 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_CAPS_LOCK, |
29 chromeos::input_method::kCapsLockKey }, | 29 chromeos::input_method::kCapsLockKey }, |
| 30 { IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_ESCAPE, |
| 31 chromeos::input_method::kEscapeKey }, |
30 }; | 32 }; |
31 | 33 |
32 const char* kDataValuesNames[] = { | 34 const char* kDataValuesNames[] = { |
33 "remapSearchKeyToValue", | 35 "remapSearchKeyToValue", |
34 "remapControlKeyToValue", | 36 "remapControlKeyToValue", |
35 "remapAltKeyToValue", | 37 "remapAltKeyToValue", |
36 "remapCapsLockKeyToValue", | 38 "remapCapsLockKeyToValue", |
37 "remapDiamondKeyToValue", | 39 "remapDiamondKeyToValue", |
38 }; | 40 }; |
39 } // namespace | 41 } // namespace |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 web_ui()->CallJavascriptFunction( | 107 web_ui()->CallJavascriptFunction( |
106 "options.KeyboardOverlay.showCapsLockOptions", | 108 "options.KeyboardOverlay.showCapsLockOptions", |
107 show_caps_lock_options); | 109 show_caps_lock_options); |
108 web_ui()->CallJavascriptFunction( | 110 web_ui()->CallJavascriptFunction( |
109 "options.KeyboardOverlay.showDiamondKeyOptions", | 111 "options.KeyboardOverlay.showDiamondKeyOptions", |
110 show_diamond_key_options); | 112 show_diamond_key_options); |
111 } | 113 } |
112 | 114 |
113 } // namespace options | 115 } // namespace options |
114 } // namespace chromeos | 116 } // namespace chromeos |
OLD | NEW |