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

Side by Side Diff: chrome/browser/resources/access_chromevox/audio/common/remote_earcons_manager.js

Issue 6254007: Adding ChromeVox as a component extensions (enabled only for ChromeOS, for no... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 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.
4
5 /**
6 * @fileoverview Bridge that sends earcon messages from content scripts or
7 * other pages to the main background page.
8 */
9
10 goog.provide('cvox.RemoteEarconsManager');
11
12 goog.require('cvox.AbstractEarconsManager');
13 goog.require('cvox.ExtensionBridge');
14
15 if (BUILD_TYPE == BUILD_TYPE_CHROME) {
16 /**
17 * @constructor
18 * @extends {cvox.AbstractEarconsManager}
19 */
20 cvox.RemoteEarconsManager = function() {
21 cvox.AbstractEarconsManager.call(this);
22 };
23 goog.inherits(cvox.RemoteEarconsManager, cvox.AbstractEarconsManager);
24
25 /**
26 * @return {string} The human-readable name of this instance.
27 */
28 cvox.RemoteEarconsManager.prototype.getName = function() {
29 return 'RemoteEarconsManager';
30 };
31
32 /**
33 * Plays the specified earcon.
34 * @param {number} earcon The earcon to be played.
35 */
36 cvox.RemoteEarconsManager.prototype.playEarcon = function(earcon) {
37 cvox.RemoteEarconsManager.superClass_.playEarcon.call(this, earcon);
38 cvox.ExtensionBridge.send({
39 'target': 'EARCON',
40 'action': 'play',
41 'earcon': earcon});
42 };
43
44 /**
45 * Switch to the next earcon set and optionally announce its name.
46 * If no earcon sets have been specified this function is a NOOP.
47 * @param {boolean} announce If true, will announce the name of the
48 * new earcon set.
49 */
50 cvox.RemoteEarconsManager.prototype.nextEarcons = function(announce) {
51 cvox.RemoteEarconsManager.superClass_.nextEarcons.call(this, announce);
52 cvox.ExtensionBridge.send({
53 'target': 'EARCON',
54 'action': 'nextEarcons'});
55 };
56
57 } else {
58 cvox.RemoteEarconsManager = function() {};
59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698