| 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/chromeos/keyboard_overlay_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 struct ModifierToLabel { | 49 struct ModifierToLabel { |
| 50 const ModifierKey modifier; | 50 const ModifierKey modifier; |
| 51 const char* label; | 51 const char* label; |
| 52 } kModifierToLabels[] = { | 52 } kModifierToLabels[] = { |
| 53 {chromeos::input_method::kSearchKey, "search"}, | 53 {chromeos::input_method::kSearchKey, "search"}, |
| 54 {chromeos::input_method::kControlKey, "ctrl"}, | 54 {chromeos::input_method::kControlKey, "ctrl"}, |
| 55 {chromeos::input_method::kAltKey, "alt"}, | 55 {chromeos::input_method::kAltKey, "alt"}, |
| 56 {chromeos::input_method::kVoidKey, "disabled"}, | 56 {chromeos::input_method::kVoidKey, "disabled"}, |
| 57 {chromeos::input_method::kCapsLockKey, "caps lock"}, | 57 {chromeos::input_method::kCapsLockKey, "caps lock"}, |
| 58 {chromeos::input_method::kEscapeKey, "esc"}, | 58 {chromeos::input_method::kEscapeKey, "esc"}, |
| 59 {chromeos::input_method::kBackspaceKey, "backspace"}, |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 struct I18nContentToMessage { | 62 struct I18nContentToMessage { |
| 62 const char* i18n_content; | 63 const char* i18n_content; |
| 63 int message; | 64 int message; |
| 64 } kI18nContentToMessage[] = { | 65 } kI18nContentToMessage[] = { |
| 65 { "keyboardOverlayLearnMore", IDS_KEYBOARD_OVERLAY_LEARN_MORE }, | 66 { "keyboardOverlayLearnMore", IDS_KEYBOARD_OVERLAY_LEARN_MORE }, |
| 66 { "keyboardOverlayTitle", IDS_KEYBOARD_OVERLAY_TITLE }, | 67 { "keyboardOverlayTitle", IDS_KEYBOARD_OVERLAY_TITLE }, |
| 67 { "keyboardOverlayEscKeyLabel", IDS_KEYBOARD_OVERLAY_ESC_KEY_LABEL }, | 68 { "keyboardOverlayEscKeyLabel", IDS_KEYBOARD_OVERLAY_ESC_KEY_LABEL }, |
| 68 { "keyboardOverlayBackKeyLabel", IDS_KEYBOARD_OVERLAY_BACK_KEY_LABEL }, | 69 { "keyboardOverlayBackKeyLabel", IDS_KEYBOARD_OVERLAY_BACK_KEY_LABEL }, |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) | 418 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) |
| 418 : WebDialogUI(web_ui) { | 419 : WebDialogUI(web_ui) { |
| 419 Profile* profile = Profile::FromWebUI(web_ui); | 420 Profile* profile = Profile::FromWebUI(web_ui); |
| 420 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); | 421 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); |
| 421 web_ui->AddMessageHandler(handler); | 422 web_ui->AddMessageHandler(handler); |
| 422 | 423 |
| 423 // Set up the chrome://keyboardoverlay/ source. | 424 // Set up the chrome://keyboardoverlay/ source. |
| 424 content::WebUIDataSource::Add(profile, | 425 content::WebUIDataSource::Add(profile, |
| 425 CreateKeyboardOverlayUIHTMLSource(profile)); | 426 CreateKeyboardOverlayUIHTMLSource(profile)); |
| 426 } | 427 } |
| OLD | NEW |