| 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 */ |
| 11 | 11 |
| 12 goog.provide('cvox.AbstractEarcons'); | 12 goog.provide('cvox.AbstractEarcons'); |
| 13 goog.provide('cvox.Earcon'); | 13 goog.provide('cvox.Earcon'); |
| 14 | 14 |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Earcon names. | 17 * Earcon names. |
| 18 * @enum {string} | 18 * @enum {string} |
| 19 */ | 19 */ |
| 20 cvox.Earcon = { | 20 cvox.Earcon = { |
| 21 ALERT_MODAL: 'alert_modal', | 21 ALERT_MODAL: 'alert_modal', |
| 22 ALERT_NONMODAL: 'alert_nonmodal', | 22 ALERT_NONMODAL: 'alert_nonmodal', |
| 23 BULLET: 'bullet', | |
| 24 BUSY_PROGRESS_LOOP: 'busy_progress_loop', | |
| 25 BUTTON: 'button', | 23 BUTTON: 'button', |
| 26 CHECK_OFF: 'check_off', | 24 CHECK_OFF: 'check_off', |
| 27 CHECK_ON: 'check_on', | 25 CHECK_ON: 'check_on', |
| 28 EDITABLE_TEXT: 'editable_text', | 26 EDITABLE_TEXT: 'editable_text', |
| 29 FONT_CHANGE: 'font_change', | |
| 30 INVALID_KEYPRESS: 'invalid_keypress', | 27 INVALID_KEYPRESS: 'invalid_keypress', |
| 31 LINK: 'link', | 28 LINK: 'link', |
| 32 LISTBOX: 'listbox', | 29 LISTBOX: 'listbox', |
| 33 LIST_ITEM: 'bullet', | 30 LIST_ITEM: 'list_item', |
| 34 LONG_DESC: 'long_desc', | 31 LONG_DESC: 'long_desc', |
| 32 MATH: 'math', |
| 35 OBJECT_CLOSE: 'object_close', | 33 OBJECT_CLOSE: 'object_close', |
| 36 OBJECT_ENTER: 'object_enter', | 34 OBJECT_ENTER: 'object_enter', |
| 37 OBJECT_EXIT: 'object_exit', | 35 OBJECT_EXIT: 'object_exit', |
| 38 OBJECT_OPEN: 'object_open', | 36 OBJECT_OPEN: 'object_open', |
| 39 OBJECT_SELECT: 'object_select', | 37 OBJECT_SELECT: 'object_select', |
| 40 PARAGRAPH_BREAK: 'paragraph_break', | 38 PAGE_FINISH_LOADING: 'page_finish_loading', |
| 41 SECTION: 'section', | 39 PAGE_START_LOADING: 'page_start_loading', |
| 40 RECOVER_FOCUS: 'recover_focus', |
| 42 SELECTION: 'selection', | 41 SELECTION: 'selection', |
| 43 SELECTION_REVERSE: 'selection_reverse', | 42 SELECTION_REVERSE: 'selection_reverse', |
| 44 SPECIAL_CONTENT: 'special_content', | 43 SKIP: 'skip', |
| 45 TASK_SUCCESS: 'task_success', | |
| 46 WRAP: 'wrap', | 44 WRAP: 'wrap', |
| 47 WRAP_EDGE: 'wrap_edge', | 45 WRAP_EDGE: 'wrap_edge', |
| 48 }; | 46 }; |
| 49 | 47 |
| 50 | 48 |
| 51 /** | 49 /** |
| 52 * @constructor | 50 * @constructor |
| 53 */ | 51 */ |
| 54 cvox.AbstractEarcons = function() { | 52 cvox.AbstractEarcons = function() { |
| 55 /** | 53 /** |
| (...skipping 23 matching lines...) Expand all Loading... |
| 79 | 77 |
| 80 | 78 |
| 81 /** | 79 /** |
| 82 * Toggles earcons on or off. | 80 * Toggles earcons on or off. |
| 83 * @return {boolean} True if earcons are now enabled; false otherwise. | 81 * @return {boolean} True if earcons are now enabled; false otherwise. |
| 84 */ | 82 */ |
| 85 cvox.AbstractEarcons.prototype.toggle = function() { | 83 cvox.AbstractEarcons.prototype.toggle = function() { |
| 86 this.enabled = !this.enabled; | 84 this.enabled = !this.enabled; |
| 87 return this.enabled; | 85 return this.enabled; |
| 88 }; | 86 }; |
| OLD | NEW |