cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / chromevox / host / interface / abstract_earcons.js
blob6bf8c9b70249f3d68b38ca9ee5ed93186267f9cb
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
3 // found in the LICENSE file.
5 /**
6 * @fileoverview Base class for implementing earcons.
8 * When adding earcons, please add them to getEarconName and getEarconId.
12 goog.provide('cvox.AbstractEarcons');
13 goog.provide('cvox.Earcon');
16 /**
17 * Earcon names.
18 * @enum {string}
20 cvox.Earcon = {
21 ALERT_MODAL: 'alert_modal',
22 ALERT_NONMODAL: 'alert_nonmodal',
23 BULLET: 'bullet',
24 BUSY_PROGRESS_LOOP: 'busy_progress_loop',
25 BUTTON: 'button',
26 CHECK_OFF: 'check_off',
27 CHECK_ON: 'check_on',
28 EDITABLE_TEXT: 'editable_text',
29 FONT_CHANGE: 'font_change',
30 INVALID_KEYPRESS: 'invalid_keypress',
31 LINK: 'link',
32 LISTBOX: 'listbox',
33 LIST_ITEM: 'bullet',
34 LONG_DESC: 'long_desc',
35 OBJECT_CLOSE: 'object_close',
36 OBJECT_ENTER: 'object_enter',
37 OBJECT_EXIT: 'object_exit',
38 OBJECT_OPEN: 'object_open',
39 OBJECT_SELECT: 'object_select',
40 PARAGRAPH_BREAK: 'paragraph_break',
41 SECTION: 'section',
42 SELECTION: 'selection',
43 SELECTION_REVERSE: 'selection_reverse',
44 SPECIAL_CONTENT: 'special_content',
45 TASK_SUCCESS: 'task_success',
46 WRAP: 'wrap',
47 WRAP_EDGE: 'wrap_edge',
51 /**
52 * @constructor
54 cvox.AbstractEarcons = function() {
55 /**
56 * Public flag set to enable or disable earcons. Callers should prefer
57 * toggle(); however, this member is public for initialization.
58 * @type {boolean}
60 this.enabled = true;
64 /**
65 * Plays the specified earcon sound.
66 * @param {cvox.Earcon} earcon An earcon identifier.
68 cvox.AbstractEarcons.prototype.playEarcon = function(earcon) {
72 /**
73 * Whether or not earcons are available.
74 * @return {boolean} True if earcons are available.
76 cvox.AbstractEarcons.prototype.earconsAvailable = function() {
77 return true;
81 /**
82 * Toggles earcons on or off.
83 * @return {boolean} True if earcons are now enabled; false otherwise.
85 cvox.AbstractEarcons.prototype.toggle = function() {
86 this.enabled = !this.enabled;
87 return this.enabled;