| Index: chrome/browser/resources/chromeos/keyboard_overlay.js
|
| diff --git a/chrome/browser/resources/chromeos/keyboard_overlay.js b/chrome/browser/resources/chromeos/keyboard_overlay.js
|
| index 4d68ac1b44acac56fb6b4882024817151f9ffecf..80be8e386cf45ef613ff0dc4ba0beb3ffd695f6b 100644
|
| --- a/chrome/browser/resources/chromeos/keyboard_overlay.js
|
| +++ b/chrome/browser/resources/chromeos/keyboard_overlay.js
|
| @@ -128,6 +128,17 @@ function getShortcutData() {
|
|
|
| shortcutDataCache = keyboardOverlayData['shortcut'];
|
|
|
| + if (!isDisplayRotationEnabled()) {
|
| + // Rotate screen
|
| + delete shortcutDataCache['reload<>CTRL<>SHIFT'];
|
| + }
|
| + if (!isDisplayUIScalingEnabled()) {
|
| + // Scale up UI
|
| + delete shortcutDataCache['back<>CTRL<>SHIFT'];
|
| + // Scale down UI
|
| + delete shortcutDataCache['forward<>CTRL<>SHIFT'];
|
| + }
|
| +
|
| // TODO(mazda): Clean this up and move these out to the data js.
|
| var searchModifierAddShortcuts = {
|
| '1<>SEARCH': 'keyboardOverlayF1',
|
| @@ -608,6 +619,24 @@ function hasDiamondKey() {
|
| }
|
|
|
| /**
|
| + * Returns true if display rotation feature is enabled.
|
| + * @return {boolean} True if display rotation feature is enabled.
|
| + */
|
| +function isDisplayRotationEnabled() {
|
| + return (loadTimeData.getString('keyboardOverlayIsDisplayRotationEnabled') ==
|
| + 'true');
|
| +}
|
| +
|
| +/**
|
| + * Returns true if display scaling feature is enabled.
|
| + * @return {boolean} True if display scaling feature is enabled.
|
| + */
|
| +function isDisplayUIScalingEnabled() {
|
| + return (loadTimeData.getString('keyboardOverlayIsDisplayUIScalingEnabled') ==
|
| + 'true');
|
| +}
|
| +
|
| +/**
|
| * Initializes the layout and the key labels for the keyboard that has a diamond
|
| * key.
|
| */
|
|
|