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

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: 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 this.onAutomationEvent.bind(this), 86 this.onAutomationEvent.bind(this),
87 true); 87 true);
88 }, 88 },
89 89
90 /** 90 /**
91 * A generic handler for all desktop automation events. 91 * A generic handler for all desktop automation events.
92 * @param {AutomationEvent} evt The event. 92 * @param {AutomationEvent} evt The event.
93 */ 93 */
94 onAutomationEvent: function(evt) { 94 onAutomationEvent: function(evt) {
95 var output = evt.target.attributes.name + ' ' + evt.target.role; 95 var output = evt.target.attributes.name + ' ' + evt.target.role;
96 cvox.ChromeVox.tts.speak(output, cvox.AbstractTts.QUEUE_MODE_FLUSH); 96 cvox.ChromeVox.tts.speak(output, cvox.QueueMode.FLUSH);
97 cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(output)); 97 cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(output));
98 chrome.accessibilityPrivate.setFocusRing([evt.target.location]); 98 chrome.accessibilityPrivate.setFocusRing([evt.target.location]);
99 }, 99 },
100 100
101 /** 101 /**
102 * Handles chrome.commands.onCommand. 102 * Handles chrome.commands.onCommand.
103 * @param {string} command 103 * @param {string} command
104 */ 104 */
105 onGotCommand: function(command) { 105 onGotCommand: function(command) {
106 }, 106 },
(...skipping 16 matching lines...) Expand all
123 disableClassicChromeVox_: function(tabId) { 123 disableClassicChromeVox_: function(tabId) {
124 chrome.tabs.executeScript( 124 chrome.tabs.executeScript(
125 tabId, 125 tabId,
126 {'code': 'try { window.disableChromeVox(); } catch(e) { }\n', 126 {'code': 'try { window.disableChromeVox(); } catch(e) { }\n',
127 'allFrames': true}); 127 'allFrames': true});
128 } 128 }
129 }; 129 };
130 130
131 /** @type {cvox2.Background} */ 131 /** @type {cvox2.Background} */
132 cvox2.global.backgroundObj = new cvox2.Background(); 132 cvox2.global.backgroundObj = new cvox2.Background();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698