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

Side by Side Diff: chrome/browser/resources/chromeos/keyboard_overlay.js

Issue 2206823004: Remove "Go Back/Forward" from keyboard overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | chrome/browser/ui/browser_command_controller.cc » ('j') | 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 src="keyboard_overlay_data.js"> 5 <include src="keyboard_overlay_data.js">
6 6
7 var BASE_KEYBOARD = { 7 var BASE_KEYBOARD = {
8 top: 0, 8 top: 0,
9 left: 0, 9 left: 0,
10 width: 1237, 10 width: 1237,
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 var shortcutId = shortcutData[getAction(keyLabel, normModifiers)]; 548 var shortcutId = shortcutData[getAction(keyLabel, normModifiers)];
549 if (modifiers.length == 0 && 549 if (modifiers.length == 0 &&
550 (identifier == '2A' || identifier == '36')) { 550 (identifier == '2A' || identifier == '36')) {
551 // Either the right or left shift keys are used to disable the caps lock 551 // Either the right or left shift keys are used to disable the caps lock
552 // if it was enabled. To fix crbug.com/453623. 552 // if it was enabled. To fix crbug.com/453623.
553 shortcutId = 'keyboardOverlayDisableCapsLock'; 553 shortcutId = 'keyboardOverlayDisableCapsLock';
554 } 554 }
555 555
556 classes.push('keyboard-overlay-key-background'); 556 classes.push('keyboard-overlay-key-background');
557 557
558 if (shortcutId && (shortcutId == 'keyboardOverlayGoBack' ||
Lei Zhang 2016/08/03 23:03:43 I'm not JS expert, so take this with a grain of sa
afakhry 2016/08/04 16:44:59 I'm not a JS person either, but you were right, no
559 shortcutId == 'keyboardOverlayGoForward')) {
560 // If the "backspace key goes back" experiment is not enabled, then we
561 // clear the shortcuts for Backspace and Shift+Backspace to go back or
562 // forward respectively.
563 if (!loadTimeData.getBoolean('backspaceGoesBackFeatureEnabled'))
Lei Zhang 2016/08/03 23:03:43 Tack this on to the if statement above?
afakhry 2016/08/04 16:44:59 Done.
564 shortcutId = null;
565 }
566
558 if (shortcutId) { 567 if (shortcutId) {
559 classes.push('is-shortcut'); 568 classes.push('is-shortcut');
560 classes.push('keyboard-overlay-shortcut-key-background'); 569 classes.push('keyboard-overlay-shortcut-key-background');
561 } 570 }
562 571
563 var key = $(keyId(identifier, i)); 572 var key = $(keyId(identifier, i));
564 key.className = classes.join(' '); 573 key.className = classes.join(' ');
565 574
566 if (!keyData) { 575 if (!keyData) {
567 continue; 576 continue;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 function onWidgetShown() { 938 function onWidgetShown() {
930 setTimeout(function() { 939 setTimeout(function() {
931 // Show and focus the instructions div after a delay so that chrome vox 940 // Show and focus the instructions div after a delay so that chrome vox
932 // speaks it correctly. 941 // speaks it correctly.
933 $('instructions').style.visibility = 'visible'; 942 $('instructions').style.visibility = 'visible';
934 $('instructions').focus(); 943 $('instructions').focus();
935 }, 500); 944 }, 500);
936 } 945 }
937 946
938 document.addEventListener('DOMContentLoaded', init); 947 document.addEventListener('DOMContentLoaded', init);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698