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

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

Issue 1319093003: Use new earcons in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@automation_node_id_fix_2
Patch Set: Rebase Created 5 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 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 */
(...skipping 19 matching lines...) Expand all
30 LIST_ITEM: 'list_item', 30 LIST_ITEM: 'list_item',
31 LONG_DESC: 'long_desc', 31 LONG_DESC: 'long_desc',
32 MATH: 'math', 32 MATH: 'math',
33 OBJECT_CLOSE: 'object_close', 33 OBJECT_CLOSE: 'object_close',
34 OBJECT_ENTER: 'object_enter', 34 OBJECT_ENTER: 'object_enter',
35 OBJECT_EXIT: 'object_exit', 35 OBJECT_EXIT: 'object_exit',
36 OBJECT_OPEN: 'object_open', 36 OBJECT_OPEN: 'object_open',
37 OBJECT_SELECT: 'object_select', 37 OBJECT_SELECT: 'object_select',
38 PAGE_FINISH_LOADING: 'page_finish_loading', 38 PAGE_FINISH_LOADING: 'page_finish_loading',
39 PAGE_START_LOADING: 'page_start_loading', 39 PAGE_START_LOADING: 'page_start_loading',
40 POP_UP_BUTTON: 'pop_up_button',
40 RECOVER_FOCUS: 'recover_focus', 41 RECOVER_FOCUS: 'recover_focus',
41 SELECTION: 'selection', 42 SELECTION: 'selection',
42 SELECTION_REVERSE: 'selection_reverse', 43 SELECTION_REVERSE: 'selection_reverse',
43 SKIP: 'skip', 44 SKIP: 'skip',
45 SLIDER: 'slider',
44 WRAP: 'wrap', 46 WRAP: 'wrap',
45 WRAP_EDGE: 'wrap_edge', 47 WRAP_EDGE: 'wrap_edge',
46 }; 48 };
47 49
48 50
49 /** 51 /**
50 * @constructor 52 * @constructor
51 */ 53 */
52 cvox.AbstractEarcons = function() { 54 cvox.AbstractEarcons = function() {
53 /**
54 * Public flag set to enable or disable earcons. Callers should prefer
55 * toggle(); however, this member is public for initialization.
56 * @type {boolean}
57 */
58 this.enabled = true;
59 }; 55 };
60 56
61 57
62 /** 58 /**
59 * Public static flag set to enable or disable earcons. Callers should prefer
60 * toggle(); however, this member is public for initialization.
61 * @type {boolean}
62 */
63 cvox.AbstractEarcons.enabled = true;
64
65
66 /**
63 * Plays the specified earcon sound. 67 * Plays the specified earcon sound.
64 * @param {cvox.Earcon} earcon An earcon identifier. 68 * @param {cvox.Earcon} earcon An earcon identifier.
65 */ 69 */
66 cvox.AbstractEarcons.prototype.playEarcon = function(earcon) { 70 cvox.AbstractEarcons.prototype.playEarcon = function(earcon) {
67 }; 71 };
68 72
69 73
70 /** 74 /**
71 * Whether or not earcons are available. 75 * Whether or not earcons are available.
72 * @return {boolean} True if earcons are available. 76 * @return {boolean} True if earcons are available.
73 */ 77 */
74 cvox.AbstractEarcons.prototype.earconsAvailable = function() { 78 cvox.AbstractEarcons.prototype.earconsAvailable = function() {
75 return true; 79 return true;
76 }; 80 };
77 81
78 82
79 /** 83 /**
80 * Toggles earcons on or off. 84 * Toggles earcons on or off.
81 * @return {boolean} True if earcons are now enabled; false otherwise. 85 * @return {boolean} True if earcons are now enabled; false otherwise.
82 */ 86 */
83 cvox.AbstractEarcons.prototype.toggle = function() { 87 cvox.AbstractEarcons.prototype.toggle = function() {
84 this.enabled = !this.enabled; 88 cvox.AbstractEarcons.enabled = !cvox.AbstractEarcons.enabled;
85 return this.enabled; 89 return cvox.AbstractEarcons.enabled;
86 }; 90 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698