OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
6 * @fileoverview ChromeVox keyboard handler. | 6 * @fileoverview ChromeVox keyboard handler. |
7 */ | 7 */ |
8 | 8 |
9 goog.provide('BackgroundKeyboardHandler'); | 9 goog.provide('BackgroundKeyboardHandler'); |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 } else { | 85 } else { |
86 chrome.accessibilityPrivate.setKeyboardListener( | 86 chrome.accessibilityPrivate.setKeyboardListener( |
87 true, cvox.ChromeVox.isStickyPrefOn); | 87 true, cvox.ChromeVox.isStickyPrefOn); |
88 } | 88 } |
89 | 89 |
90 if (newMode === ChromeVoxMode.NEXT || | 90 if (newMode === ChromeVoxMode.NEXT || |
91 newMode === ChromeVoxMode.FORCE_NEXT) { | 91 newMode === ChromeVoxMode.FORCE_NEXT) { |
92 // Switching out of classic, classic compat, or uninitialized | 92 // Switching out of classic, classic compat, or uninitialized |
93 // (on startup). | 93 // (on startup). |
94 window['prefs'].switchToKeyMap('keymap_next'); | 94 window['prefs'].switchToKeyMap('keymap_next'); |
95 } else if (oldMode && | 95 } else if ( |
96 oldMode != ChromeVoxMode.CLASSIC && | 96 oldMode && oldMode != ChromeVoxMode.CLASSIC && |
97 oldMode != ChromeVoxMode.CLASSIC_COMPAT) { | 97 oldMode != ChromeVoxMode.CLASSIC_COMPAT) { |
98 // Switching out of next. Intentionally do nothing when switching out of | 98 // Switching out of next. Intentionally do nothing when switching out of |
99 // an uninitialized |oldMode|. | 99 // an uninitialized |oldMode|. |
100 window['prefs'].switchToKeyMap('keymap_classic'); | 100 window['prefs'].switchToKeyMap('keymap_classic'); |
101 } | 101 } |
102 } | 102 } |
103 }; | 103 }; |
OLD | NEW |