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..3fed9c8f64ba5e83e45e98d368985d3ff663b275 100644 |
--- a/chrome/browser/resources/chromeos/keyboard_overlay.js |
+++ b/chrome/browser/resources/chromeos/keyboard_overlay.js |
@@ -128,6 +128,19 @@ function getShortcutData() { |
shortcutDataCache = keyboardOverlayData['shortcut']; |
+ if (!isDisplayRotationEnabled()) { |
+ // Rotate screen |
+ delete shortcutDataCache['reload<>CTRL<>SHIFT']; |
+ } |
+ if (!isDisplayUIScalingEnabled()) { |
+ // Zoom screen in |
+ delete shortcutDataCache['+<>CTRL<>SHIFT']; |
+ // Zoom screen out |
+ delete shortcutDataCache['-<>CTRL<>SHIFT']; |
+ // Reset screen zoom |
+ delete shortcutDataCache['0<>CTRL<>SHIFT']; |
+ } |
+ |
// TODO(mazda): Clean this up and move these out to the data js. |
var searchModifierAddShortcuts = { |
'1<>SEARCH': 'keyboardOverlayF1', |
@@ -603,8 +616,23 @@ function initLayout() { |
* @return {boolean} Returns true if the device has a diamond key. |
*/ |
function hasDiamondKey() { |
- return (loadTimeData.getString('keyboardOverlayHasChromeOSDiamondKey') == |
- 'true'); |
+ return loadTimeData.getBoolean('keyboardOverlayHasChromeOSDiamondKey'); |
+} |
+ |
+/** |
+ * Returns true if display rotation feature is enabled. |
+ * @return {boolean} True if display rotation feature is enabled. |
+ */ |
+function isDisplayRotationEnabled() { |
+ return loadTimeData.getBoolean('keyboardOverlayIsDisplayRotationEnabled'); |
+} |
+ |
+/** |
+ * Returns true if display scaling feature is enabled. |
+ * @return {boolean} True if display scaling feature is enabled. |
+ */ |
+function isDisplayUIScalingEnabled() { |
+ return loadTimeData.getBoolean('keyboardOverlayIsDisplayUIScalingEnabled'); |
} |
/** |