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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 604423002: Use an enum for ChromeVox queue mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 The entry point for all ChromeVox2 related code for the 6 * @fileoverview The entry point for all ChromeVox2 related code for the
7 * background page. 7 * background page.
8 */ 8 */
9 9
10 goog.provide('cvox2.Background'); 10 goog.provide('cvox2.Background');
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return; 178 return;
179 var container = node; 179 var container = node;
180 while (container && (container.role == 'inlineTextBox' || 180 while (container && (container.role == 'inlineTextBox' ||
181 container.role == 'staticText')) 181 container.role == 'staticText'))
182 container = container.parent(); 182 container = container.parent();
183 183
184 var role = container ? container.role : node.role; 184 var role = container ? container.role : node.role;
185 185
186 var output = 186 var output =
187 [node.attributes.name, node.attributes.value, role].join(', '); 187 [node.attributes.name, node.attributes.value, role].join(', ');
188 cvox.ChromeVox.tts.speak(output, cvox.AbstractTts.QUEUE_MODE_FLUSH); 188 cvox.ChromeVox.tts.speak(output, cvox.QueueMode.FLUSH);
189 cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(output)); 189 cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(output));
190 chrome.accessibilityPrivate.setFocusRing([evt.target.location]); 190 chrome.accessibilityPrivate.setFocusRing([evt.target.location]);
191 191
192 this.current_ = node; 192 this.current_ = node;
193 }, 193 },
194 194
195 /** 195 /**
196 * Provides all feedback once a load complete event fires. 196 * Provides all feedback once a load complete event fires.
197 * @param {Object} evt 197 * @param {Object} evt
198 */ 198 */
(...skipping 22 matching lines...) Expand all
221 disableClassicChromeVox_: function(tabId) { 221 disableClassicChromeVox_: function(tabId) {
222 chrome.tabs.executeScript( 222 chrome.tabs.executeScript(
223 tabId, 223 tabId,
224 {'code': 'try { window.disableChromeVox(); } catch(e) { }\n', 224 {'code': 'try { window.disableChromeVox(); } catch(e) { }\n',
225 'allFrames': true}); 225 'allFrames': true});
226 } 226 }
227 }; 227 };
228 228
229 /** @type {cvox2.Background} */ 229 /** @type {cvox2.Background} */
230 cvox2.global.backgroundObj = new cvox2.Background(); 230 cvox2.global.backgroundObj = new cvox2.Background();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698