Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc

Issue 2082713002: Fix keyboard overlay when the Search key is mapped to Backspace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/keyboard_overlay.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/keyboard_overlay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698