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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js

Issue 1306773003: Make earcon ids strings instead of numbers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_unused_earcons
Patch Set: Created 5 years, 3 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 Implentation of ChromeVox's public API. 6 * @fileoverview Implentation of ChromeVox's public API.
7 * 7 *
8 */ 8 */
9 9
10 goog.provide('cvox.ApiImplementation'); 10 goog.provide('cvox.ApiImplementation');
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 }; 193 };
194 194
195 /** 195 /**
196 * Plays the specified earcon sound. 196 * Plays the specified earcon sound.
197 * 197 *
198 * @param {string} earcon An earcon name. 198 * @param {string} earcon An earcon name.
199 */ 199 */
200 cvox.ApiImplementation.playEarcon = function(earcon) { 200 cvox.ApiImplementation.playEarcon = function(earcon) {
201 if (cvox.ChromeVox.isActive) { 201 if (cvox.ChromeVox.isActive) {
202 cvox.ChromeVox.earcons.playEarconByName(earcon); 202 cvox.ChromeVox.earcons.playEarcon(cvox.Earcon[earcon]);
Peter Lundblad 2015/08/27 19:54:56 Should guard against passing in undefined to this
dmazzoni 2015/08/27 21:27:47 Done.
203 } 203 }
204 }; 204 };
205 205
206 /** 206 /**
207 * Synchronizes ChromeVox's internal cursor to a node by id. 207 * Synchronizes ChromeVox's internal cursor to a node by id.
208 * 208 *
209 * @param {Object} nodeRef A serializable reference to a node. 209 * @param {Object} nodeRef A serializable reference to a node.
210 * @param {boolean=} speakNode If true, speaks out the node. 210 * @param {boolean=} speakNode If true, speaks out the node.
211 */ 211 */
212 cvox.ApiImplementation.syncToNodeRef = function(nodeRef, speakNode) { 212 cvox.ApiImplementation.syncToNodeRef = function(nodeRef, speakNode) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 * @param {...string} constraints Additional constraints. 400 * @param {...string} constraints Additional constraints.
401 */ 401 */
402 cvox.ApiImplementation.Math.defineRule = 402 cvox.ApiImplementation.Math.defineRule =
403 function(name, dynamic, action, prec, constraints) { 403 function(name, dynamic, action, prec, constraints) {
404 var mathStore = cvox.MathmlStore.getInstance(); 404 var mathStore = cvox.MathmlStore.getInstance();
405 var constraintList = Array.prototype.slice.call(arguments, 4); 405 var constraintList = Array.prototype.slice.call(arguments, 4);
406 var args = [name, dynamic, action, prec].concat(constraintList); 406 var args = [name, dynamic, action, prec].concat(constraintList);
407 407
408 mathStore.defineRule.apply(mathStore, args); 408 mathStore.defineRule.apply(mathStore, args);
409 }; 409 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698