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

Side by Side Diff: chrome/browser/resources/access_chromevox/audio/common/abstract_earcons.js

Issue 6254007: Adding ChromeVox as a component extensions (enabled only for ChromeOS, for no... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Base class for implementing earcons.
7 */
8
9 goog.provide('cvox.AbstractEarcons');
10
11 goog.require('cvox.AbstractLogger');
12
13 /**
14 * @constructor
15 * @extends {cvox.AbstractLogger}
16 */
17 cvox.AbstractEarcons = function() {
18 //Inherit AbstractLogger
19 cvox.AbstractLogger.call(this);
20 };
21 goog.inherits(cvox.AbstractEarcons, cvox.AbstractLogger);
22
23 /**
24 * Plays the specified earcon sound.
25 * @param {number} earcon An earcon index.
26 */
27 cvox.AbstractEarcons.prototype.playEarcon = function(earcon) {
28 if (this.logEnabled()) {
29 this.log('[' + this.getName() + '] playEarcon(' +
30 this.getEarconName(earcon) + ')');
31 }
32 };
33
34 /**
35 * @param {number} earcon An earcon index.
36 * @return {string} The readable earcon name.
37 */
38 cvox.AbstractEarcons.prototype.getEarconName = function(earcon) {
39 if (!this.earconNames) {
40 this.earconNames = new Array();
41 this.earconNames.push('ALERT_MODAL');
42 this.earconNames.push('ALERT_NONMODAL');
43 this.earconNames.push('BULLET');
44 this.earconNames.push('BUSY_PROGRESS_LOOP');
45 this.earconNames.push('BUSY_WORKING_LOOP');
46 this.earconNames.push('BUTTON');
47 this.earconNames.push('CHECK_OFF');
48 this.earconNames.push('CHECK_ON');
49 this.earconNames.push('COLLAPSED');
50 this.earconNames.push('EDITABLE_TEXT');
51 this.earconNames.push('ELLIPSIS');
52 this.earconNames.push('EXPANDED');
53 this.earconNames.push('FONT_CHANGE');
54 this.earconNames.push('INVALID_KEYPRESS');
55 this.earconNames.push('LINK');
56 this.earconNames.push('LISTBOX');
57 this.earconNames.push('LIST_ITEM');
58 this.earconNames.push('NEW_MAIL');
59 this.earconNames.push('OBJECT_CLOSE');
60 this.earconNames.push('OBJECT_DELETE');
61 this.earconNames.push('OBJECT_DESELECT');
62 this.earconNames.push('OBJECT_OPEN');
63 this.earconNames.push('OBJECT_SELECT');
64 this.earconNames.push('PARAGRAPH_BREAK');
65 this.earconNames.push('SEARCH_HIT');
66 this.earconNames.push('SEARCH_MISS');
67 this.earconNames.push('SECTION');
68 this.earconNames.push('TASK_SUCCESS');
69 this.earconNames.push('WRAP');
70 this.earconNames.push('WRAP_EDGE');
71 }
72 return this.earconNames[earcon];
73 };
74
75 /**
76 * @type {number}
77 */
78 cvox.AbstractEarcons.ALERT_MODAL = 0;
79
80 /**
81 * @type {number}
82 */
83 cvox.AbstractEarcons.ALERT_NONMODAL = 1;
84
85 /**
86 * @type {number}
87 */
88 cvox.AbstractEarcons.BULLET = 2;
89
90 /**
91 * @type {number}
92 */
93 cvox.AbstractEarcons.BUSY_PROGRESS_LOOP = 3;
94
95 /**
96 * @type {number}
97 */
98 cvox.AbstractEarcons.BUSY_WORKING_LOOP = 4;
99
100 /**
101 * @type {number}
102 */
103 cvox.AbstractEarcons.BUTTON = 5;
104
105 /**
106 * @type {number}
107 */
108 cvox.AbstractEarcons.CHECK_OFF = 6;
109
110 /**
111 * @type {number}
112 */
113 cvox.AbstractEarcons.CHECK_ON = 7;
114
115 /**
116 * @type {number}
117 */
118 cvox.AbstractEarcons.COLLAPSED = 8;
119
120 /**
121 * @type {number}
122 */
123 cvox.AbstractEarcons.EDITABLE_TEXT = 9;
124
125 /**
126 * @type {number}
127 */
128 cvox.AbstractEarcons.ELLIPSIS = 10;
129
130 /**
131 * @type {number}
132 */
133 cvox.AbstractEarcons.EXPANDED = 11;
134
135 /**
136 * @type {number}
137 */
138 cvox.AbstractEarcons.FONT_CHANGE = 12;
139
140 /**
141 * @type {number}
142 */
143 cvox.AbstractEarcons.INVALID_KEYPRESS = 13;
144
145 /**
146 * @type {number}
147 */
148 cvox.AbstractEarcons.LINK = 14;
149
150 /**
151 * @type {number}
152 */
153 cvox.AbstractEarcons.LISTBOX = 15;
154
155 /**
156 * @type {number}
157 */
158 cvox.AbstractEarcons.LIST_ITEM = 16;
159
160 /**
161 * @type {number}
162 */
163 cvox.AbstractEarcons.NEW_MAIL = 17;
164
165 /**
166 * @type {number}
167 */
168 cvox.AbstractEarcons.OBJECT_CLOSE = 18;
169
170 /**
171 * @type {number}
172 */
173 cvox.AbstractEarcons.OBJECT_DELETE = 18;
174
175 /**
176 * @type {number}
177 */
178 cvox.AbstractEarcons.OBJECT_DESELECT = 20;
179
180 /**
181 * @type {number}
182 */
183 cvox.AbstractEarcons.OBJECT_OPEN = 21;
184
185 /**
186 * @type {number}
187 */
188 cvox.AbstractEarcons.OBJECT_SELECT = 22;
189
190 /**
191 * @type {number}
192 */
193 cvox.AbstractEarcons.PARAGRAPH_BREAK = 23;
194
195 /**
196 * @type {number}
197 */
198 cvox.AbstractEarcons.SEARCH_HIT = 24;
199
200 /**
201 * @type {number}
202 */
203 cvox.AbstractEarcons.SEARCH_MISS = 25;
204
205 /**
206 * @type {number}
207 */
208 cvox.AbstractEarcons.SECTION = 26;
209
210 /**
211 * @type {number}
212 */
213 cvox.AbstractEarcons.TASK_SUCCESS = 27;
214
215 /**
216 * @type {number}
217 */
218 cvox.AbstractEarcons.WRAP = 28;
219
220 /**
221 * @type {number}
222 */
223 cvox.AbstractEarcons.WRAP_EDGE = 29;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698