Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
| index bbf63da5081734f38a1f0c5a271bd63a2ca4a97d..2e3834aab3aca7417a0d9a7b9addf6df96ccb3b0 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
| @@ -98,6 +98,31 @@ cvox.OptionsPage.init = function() { |
| $('version').textContent = |
| chrome.app.getDetails().version; |
| } |
| + |
| + // Temporary secret way to enable ChromeVox Next for the current run of |
| + // ChromeVox. |
| + var next = 'next'; |
| + document.body.addEventListener('keypress', function(evt) { |
| + if (next === undefined) { |
| + return; |
| + } |
| + var key = String.fromCharCode(evt.charCode); |
| + if (next[0] === key) { |
| + next = next.slice(1); |
| + |
| + if (next === '') { |
| + cvox.OptionsPage.speak( |
| + 'You are now running ChromeVox Next; open a new tab to start', |
| + cvox.QueueMode.FLUSH); |
| + next = undefined; |
| + chrome.extension.getBackgroundPage()['global'] |
| + .backgroundObj.forceActive(); |
|
dmazzoni
2015/04/29 16:48:39
How about forceChromeVoxNextActive or forceDesktop
David Tseng
2015/04/29 18:42:07
Done.
|
| + } |
| + } else { |
| + next = 'next'; |
| + } |
| + return true; |
| + }, true); |
| }; |
| /** |