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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js

Issue 2481013011: Add a page to explain earcons in the tutorial (Closed)
Patch Set: Yay; tests caught regression! Created 4 years, 1 month 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 Base class for implementing earcons. 6 * @fileoverview Base class for implementing earcons.
7 * 7 *
8 * When adding earcons, please add them to getEarconName and getEarconId. 8 * When adding earcons, please add them to getEarconName and getEarconId.
9 * 9 *
10 */ 10 */
11 11
12 goog.provide('cvox.AbstractEarcons'); 12 goog.provide('cvox.AbstractEarcons');
13 goog.provide('cvox.Earcon'); 13 goog.provide('cvox.Earcon');
14 goog.provide('cvox.EarconDescription');
14 15
15 16
16 /** 17 /**
17 * Earcon names. 18 * Earcon names.
18 * @enum {string} 19 * @enum {string}
19 */ 20 */
20 cvox.Earcon = { 21 cvox.Earcon = {
21 ALERT_MODAL: 'alert_modal', 22 ALERT_MODAL: 'alert_modal',
22 ALERT_NONMODAL: 'alert_nonmodal', 23 ALERT_NONMODAL: 'alert_nonmodal',
23 BUTTON: 'button', 24 BUTTON: 'button',
(...skipping 16 matching lines...) Expand all
40 POP_UP_BUTTON: 'pop_up_button', 41 POP_UP_BUTTON: 'pop_up_button',
41 RECOVER_FOCUS: 'recover_focus', 42 RECOVER_FOCUS: 'recover_focus',
42 SELECTION: 'selection', 43 SELECTION: 'selection',
43 SELECTION_REVERSE: 'selection_reverse', 44 SELECTION_REVERSE: 'selection_reverse',
44 SKIP: 'skip', 45 SKIP: 'skip',
45 SLIDER: 'slider', 46 SLIDER: 'slider',
46 WRAP: 'wrap', 47 WRAP: 'wrap',
47 WRAP_EDGE: 'wrap_edge', 48 WRAP_EDGE: 'wrap_edge',
48 }; 49 };
49 50
51 /**
52 * Maps a earcon id to a message id description.
53 * Only add mappings for earcons used in ChromeVox Next. This map gets
54 * used to generate tutorial content.
55 * @type {Object<string, string>}
56 */
57 cvox.EarconDescription = {
58 alert_modal: 'alert_modal_earcon_description',
59 alert_nonmodal: 'alert_nonmodal_earcon_description',
60 button: 'button_earcon_description',
61 check_off: 'check_off_earcon_description',
62 check_on: 'check_on_earcon_description',
63 editable_text: 'editable_text_earcon_description',
64 invalid_keypress: 'invalid_keypress_earcon_description',
65 link: 'link_earcon_description',
66 listbox: 'listbox_earcon_description',
67 page_start_loading: 'page_start_loading_earcon_description',
68 pop_up_button: 'pop_up_button_earcon_description',
69 slider: 'slider_earcon_description',
70 wrap: 'wrap_earcon_description',
71 };
72
50 73
51 /** 74 /**
52 * @constructor 75 * @constructor
53 */ 76 */
54 cvox.AbstractEarcons = function() { 77 cvox.AbstractEarcons = function() {
55 }; 78 };
56 79
57 80
58 /** 81 /**
59 * Public static flag set to enable or disable earcons. Callers should prefer 82 * Public static flag set to enable or disable earcons. Callers should prefer
(...skipping 29 matching lines...) Expand all
89 112
90 113
91 /** 114 /**
92 * Toggles earcons on or off. 115 * Toggles earcons on or off.
93 * @return {boolean} True if earcons are now enabled; false otherwise. 116 * @return {boolean} True if earcons are now enabled; false otherwise.
94 */ 117 */
95 cvox.AbstractEarcons.prototype.toggle = function() { 118 cvox.AbstractEarcons.prototype.toggle = function() {
96 cvox.AbstractEarcons.enabled = !cvox.AbstractEarcons.enabled; 119 cvox.AbstractEarcons.enabled = !cvox.AbstractEarcons.enabled;
97 return cvox.AbstractEarcons.enabled; 120 return cvox.AbstractEarcons.enabled;
98 }; 121 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698