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 "ash/new_window_delegate.h" | 7 #include "ash/new_window_delegate.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 KeyboardHandler::KeyboardHandler() { | 50 KeyboardHandler::KeyboardHandler() { |
51 } | 51 } |
52 | 52 |
53 KeyboardHandler::~KeyboardHandler() { | 53 KeyboardHandler::~KeyboardHandler() { |
54 } | 54 } |
55 | 55 |
56 void KeyboardHandler::GetLocalizedValues( | 56 void KeyboardHandler::GetLocalizedValues( |
57 base::DictionaryValue* localized_strings) { | 57 base::DictionaryValue* localized_strings) { |
58 DCHECK(localized_strings); | 58 DCHECK(localized_strings); |
| 59 RegisterTitle(localized_strings, "keyboardOverlay", |
| 60 IDS_OPTIONS_KEYBOARD_OVERLAY_TITLE); |
59 | 61 |
60 localized_strings->SetString("keyboardOverlayTitle", | |
61 l10n_util::GetStringUTF16(IDS_OPTIONS_KEYBOARD_OVERLAY_TITLE)); | |
62 localized_strings->SetString("remapSearchKeyToContent", | 62 localized_strings->SetString("remapSearchKeyToContent", |
63 l10n_util::GetStringUTF16( | 63 l10n_util::GetStringUTF16( |
64 IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_SEARCH_LABEL)); | 64 IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_SEARCH_LABEL)); |
65 localized_strings->SetString("remapControlKeyToContent", | 65 localized_strings->SetString("remapControlKeyToContent", |
66 l10n_util::GetStringUTF16( | 66 l10n_util::GetStringUTF16( |
67 IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_CTRL_LABEL)); | 67 IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_CTRL_LABEL)); |
68 localized_strings->SetString("remapAltKeyToContent", | 68 localized_strings->SetString("remapAltKeyToContent", |
69 l10n_util::GetStringUTF16( | 69 l10n_util::GetStringUTF16( |
70 IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_ALT_LABEL)); | 70 IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_ALT_LABEL)); |
71 localized_strings->SetString("remapCapsLockKeyToContent", | 71 localized_strings->SetString("remapCapsLockKeyToContent", |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 base::Bind(&KeyboardHandler::HandleShowKeyboardShortcuts, | 154 base::Bind(&KeyboardHandler::HandleShowKeyboardShortcuts, |
155 base::Unretained(this))); | 155 base::Unretained(this))); |
156 } | 156 } |
157 | 157 |
158 void KeyboardHandler::HandleShowKeyboardShortcuts(const base::ListValue* args) { | 158 void KeyboardHandler::HandleShowKeyboardShortcuts(const base::ListValue* args) { |
159 ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay(); | 159 ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay(); |
160 } | 160 } |
161 | 161 |
162 } // namespace options | 162 } // namespace options |
163 } // namespace chromeos | 163 } // namespace chromeos |
OLD | NEW |