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

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

Issue 779103002: Revert of Various changes required to support ChromeVox Next to read Views and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
index fb803d1f863b483abdebc2661a3b4614118e849c..aaccf0636975fc27898cb1cda47da5c3c97f1fa9 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
@@ -122,14 +122,21 @@
});
var self = this;
-
- // Inject the content script into all running tabs.
- chrome.windows.getAll({'populate': true}, function(windows) {
- for (var i = 0; i < windows.length; i++) {
- var tabs = windows[i].tabs;
- self.injectChromeVoxIntoTabs(tabs);
- }
- });
+ if (chrome.commandLinePrivate) {
+ chrome.commandLinePrivate.hasSwitch('enable-chromevox-next',
+ goog.bind(function(result) {
+ if (result) {
+ return;
+ }
+ // Inject the content script into all running tabs.
+ chrome.windows.getAll({'populate': true}, function(windows) {
+ for (var i = 0; i < windows.length; i++) {
+ var tabs = windows[i].tabs;
+ self.injectChromeVoxIntoTabs(tabs);
+ }
+ });
+ }, this));
+ }
if (localStorage['active'] == 'false') {
// Warn the user when the browser first starts if ChromeVox is inactive.

Powered by Google App Engine
This is Rietveld 408576698