OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Earcons library that uses EarconEngine to play back | 6 * @fileoverview Earcons library that uses EarconEngine to play back |
7 * auditory cues. | 7 * auditory cues. |
8 */ | 8 */ |
9 | 9 |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 case cvox.Earcon.OBJECT_EXIT: | 83 case cvox.Earcon.OBJECT_EXIT: |
84 case cvox.Earcon.OBJECT_OPEN: | 84 case cvox.Earcon.OBJECT_OPEN: |
85 case cvox.Earcon.OBJECT_SELECT: | 85 case cvox.Earcon.OBJECT_SELECT: |
86 // TODO(dmazzoni): decide if we want new earcons for these | 86 // TODO(dmazzoni): decide if we want new earcons for these |
87 // or not. We may choose to not have earcons for some of these. | 87 // or not. We may choose to not have earcons for some of these. |
88 break; | 88 break; |
89 case cvox.Earcon.PAGE_FINISH_LOADING: | 89 case cvox.Earcon.PAGE_FINISH_LOADING: |
90 this.engine_.cancelProgress(); | 90 this.engine_.cancelProgress(); |
91 break; | 91 break; |
92 case cvox.Earcon.PAGE_START_LOADING: | 92 case cvox.Earcon.PAGE_START_LOADING: |
93 // TODO(dmazzoni): only when the page has focus. | |
94 this.engine_.startProgress(); | 93 this.engine_.startProgress(); |
95 break; | 94 break; |
96 case cvox.Earcon.POP_UP_BUTTON: | 95 case cvox.Earcon.POP_UP_BUTTON: |
97 this.engine_.onPopUpButton(); | 96 this.engine_.onPopUpButton(); |
98 break; | 97 break; |
99 case cvox.Earcon.RECOVER_FOCUS: | 98 case cvox.Earcon.RECOVER_FOCUS: |
100 // TODO(dmazzoni): decide if we want new earcons for this. | 99 // TODO(dmazzoni): decide if we want new earcons for this. |
101 break; | 100 break; |
102 case cvox.Earcon.SELECTION: | 101 case cvox.Earcon.SELECTION: |
103 this.engine_.onSelection(); | 102 this.engine_.onSelection(); |
104 break; | 103 break; |
105 case cvox.Earcon.SELECTION_REVERSE: | 104 case cvox.Earcon.SELECTION_REVERSE: |
106 this.engine_.onSelectionReverse(); | 105 this.engine_.onSelectionReverse(); |
107 break; | 106 break; |
108 case cvox.Earcon.SKIP: | 107 case cvox.Earcon.SKIP: |
109 this.engine_.onSkim(); | 108 this.engine_.onSkim(); |
110 break; | 109 break; |
111 case cvox.Earcon.SLIDER: | 110 case cvox.Earcon.SLIDER: |
112 this.engine_.onSlider(); | 111 this.engine_.onSlider(); |
113 break; | 112 break; |
114 case cvox.Earcon.WRAP: | 113 case cvox.Earcon.WRAP: |
115 case cvox.Earcon.WRAP_EDGE: | 114 case cvox.Earcon.WRAP_EDGE: |
116 this.engine_.onWrap(); | 115 this.engine_.onWrap(); |
117 break; | 116 break; |
118 } | 117 } |
119 } | 118 }, |
| 119 |
| 120 /** |
| 121 * @override |
| 122 */ |
| 123 cancelEarcon: function(earcon) { |
| 124 switch (earcon) { |
| 125 case cvox.Earcon.PAGE_START_LOADING: |
| 126 this.engine_.cancelProgress(); |
| 127 break; |
| 128 } |
| 129 }, |
120 }; | 130 }; |
OLD | NEW |