OLD | NEW |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 * 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 |
83 * toggle(); however, this member is public for initialization. | 83 * toggle(); however, this member is public for initialization. |
84 * @type {boolean} | 84 * @type {boolean} |
85 */ | 85 */ |
86 cvox.AbstractEarcons.enabled = true; | 86 cvox.AbstractEarcons.enabled = true; |
87 | 87 |
88 | 88 |
89 /** | 89 /** |
90 * Plays the specified earcon sound. | 90 * Plays the specified earcon sound. |
91 * @param {cvox.Earcon} earcon An earcon identifier. | 91 * @param {cvox.Earcon} earcon An earcon identifier. |
| 92 * @param {Object=} opt_location A location associated with the earcon such as a |
| 93 * control's bounding rectangle. |
92 */ | 94 */ |
93 cvox.AbstractEarcons.prototype.playEarcon = function(earcon) { | 95 cvox.AbstractEarcons.prototype.playEarcon = function(earcon, opt_location) { |
94 }; | 96 }; |
95 | 97 |
96 | 98 |
97 /** | 99 /** |
98 * Cancels the specified earcon sound. | 100 * Cancels the specified earcon sound. |
99 * @param {cvox.Earcon} earcon An earcon identifier. | 101 * @param {cvox.Earcon} earcon An earcon identifier. |
100 */ | 102 */ |
101 cvox.AbstractEarcons.prototype.cancelEarcon = function(earcon) { | 103 cvox.AbstractEarcons.prototype.cancelEarcon = function(earcon) { |
102 }; | 104 }; |
103 | 105 |
104 | 106 |
105 /** | 107 /** |
106 * Whether or not earcons are available. | 108 * Whether or not earcons are available. |
107 * @return {boolean} True if earcons are available. | 109 * @return {boolean} True if earcons are available. |
108 */ | 110 */ |
109 cvox.AbstractEarcons.prototype.earconsAvailable = function() { | 111 cvox.AbstractEarcons.prototype.earconsAvailable = function() { |
110 return true; | 112 return true; |
111 }; | 113 }; |
112 | 114 |
113 | 115 |
114 /** | 116 /** |
115 * Toggles earcons on or off. | 117 * Toggles earcons on or off. |
116 * @return {boolean} True if earcons are now enabled; false otherwise. | 118 * @return {boolean} True if earcons are now enabled; false otherwise. |
117 */ | 119 */ |
118 cvox.AbstractEarcons.prototype.toggle = function() { | 120 cvox.AbstractEarcons.prototype.toggle = function() { |
119 cvox.AbstractEarcons.enabled = !cvox.AbstractEarcons.enabled; | 121 cvox.AbstractEarcons.enabled = !cvox.AbstractEarcons.enabled; |
120 return cvox.AbstractEarcons.enabled; | 122 return cvox.AbstractEarcons.enabled; |
121 }; | 123 }; |
OLD | NEW |