| 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 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 if (!isDisplayUIScalingEnabled()) { | 221 if (!isDisplayUIScalingEnabled()) { |
| 222 // Zoom screen in | 222 // Zoom screen in |
| 223 delete shortcutDataCache['+<>CTRL<>SHIFT']; | 223 delete shortcutDataCache['+<>CTRL<>SHIFT']; |
| 224 // Zoom screen out | 224 // Zoom screen out |
| 225 delete shortcutDataCache['-<>CTRL<>SHIFT']; | 225 delete shortcutDataCache['-<>CTRL<>SHIFT']; |
| 226 // Reset screen zoom | 226 // Reset screen zoom |
| 227 delete shortcutDataCache['0<>CTRL<>SHIFT']; | 227 delete shortcutDataCache['0<>CTRL<>SHIFT']; |
| 228 } | 228 } |
| 229 | 229 |
| 230 if (!loadTimeData.getBoolean('backspaceGoesBackFeatureEnabled')) { | |
| 231 // If the "backspace key goes back" experiment is not enabled, then we | |
| 232 // clear the shortcuts for Backspace and Shift+Backspace to go back or | |
| 233 // forward respectively. | |
| 234 delete shortcutDataCache['backspace']; | |
| 235 delete shortcutDataCache['backspace<>SHIFT']; | |
| 236 } | |
| 237 | |
| 238 return shortcutDataCache; | 230 return shortcutDataCache; |
| 239 } | 231 } |
| 240 | 232 |
| 241 /** | 233 /** |
| 242 * Returns the keyboard overlay ID. | 234 * Returns the keyboard overlay ID. |
| 243 * @return {string} Keyboard overlay ID. | 235 * @return {string} Keyboard overlay ID. |
| 244 */ | 236 */ |
| 245 function getKeyboardOverlayId() { | 237 function getKeyboardOverlayId() { |
| 246 return keyboardOverlayId; | 238 return keyboardOverlayId; |
| 247 } | 239 } |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 function onWidgetShown() { | 944 function onWidgetShown() { |
| 953 setTimeout(function() { | 945 setTimeout(function() { |
| 954 // Show and focus the instructions div after a delay so that chrome vox | 946 // Show and focus the instructions div after a delay so that chrome vox |
| 955 // speaks it correctly. | 947 // speaks it correctly. |
| 956 $('instructions').style.visibility = 'visible'; | 948 $('instructions').style.visibility = 'visible'; |
| 957 $('instructions').focus(); | 949 $('instructions').focus(); |
| 958 }, 500); | 950 }, 500); |
| 959 } | 951 } |
| 960 | 952 |
| 961 document.addEventListener('DOMContentLoaded', init); | 953 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |