Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js

Issue 2092743002: Revert of Make ChromeVox Next a setting in options page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 7adedde18c0c39f1d67881cbe78d163a67bcee9b..1cc387396b88a39c6f64830a27b2fe9ccdee62eb 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js
@@ -95,11 +95,29 @@
chrome.app.getDetails().version;
}
- $('useNext').addEventListener('change', function(evt) {
- var checked = evt.target.checked;
- var background =
- chrome.extension.getBackgroundPage().ChromeVoxState.instance;
- background.toggleNext(checked);
+ // 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.forceChromeVoxNextActive();
+ }
+ } else {
+ next = 'next';
+ }
+ return true;
}, true);
};

Powered by Google App Engine
This is Rietveld 408576698