| Index: chrome/browser/resources/access_chromevox/audio/common/remote_earcons_manager.js
|
| ===================================================================
|
| --- chrome/browser/resources/access_chromevox/audio/common/remote_earcons_manager.js (revision 0)
|
| +++ chrome/browser/resources/access_chromevox/audio/common/remote_earcons_manager.js (revision 0)
|
| @@ -0,0 +1,59 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +/**
|
| + * @fileoverview Bridge that sends earcon messages from content scripts or
|
| + * other pages to the main background page.
|
| + */
|
| +
|
| +goog.provide('cvox.RemoteEarconsManager');
|
| +
|
| +goog.require('cvox.AbstractEarconsManager');
|
| +goog.require('cvox.ExtensionBridge');
|
| +
|
| +if (BUILD_TYPE == BUILD_TYPE_CHROME) {
|
| + /**
|
| + * @constructor
|
| + * @extends {cvox.AbstractEarconsManager}
|
| + */
|
| + cvox.RemoteEarconsManager = function() {
|
| + cvox.AbstractEarconsManager.call(this);
|
| + };
|
| + goog.inherits(cvox.RemoteEarconsManager, cvox.AbstractEarconsManager);
|
| +
|
| + /**
|
| + * @return {string} The human-readable name of this instance.
|
| + */
|
| + cvox.RemoteEarconsManager.prototype.getName = function() {
|
| + return 'RemoteEarconsManager';
|
| + };
|
| +
|
| + /**
|
| + * Plays the specified earcon.
|
| + * @param {number} earcon The earcon to be played.
|
| + */
|
| + cvox.RemoteEarconsManager.prototype.playEarcon = function(earcon) {
|
| + cvox.RemoteEarconsManager.superClass_.playEarcon.call(this, earcon);
|
| + cvox.ExtensionBridge.send({
|
| + 'target': 'EARCON',
|
| + 'action': 'play',
|
| + 'earcon': earcon});
|
| + };
|
| +
|
| + /**
|
| + * Switch to the next earcon set and optionally announce its name.
|
| + * If no earcon sets have been specified this function is a NOOP.
|
| + * @param {boolean} announce If true, will announce the name of the
|
| + * new earcon set.
|
| + */
|
| + cvox.RemoteEarconsManager.prototype.nextEarcons = function(announce) {
|
| + cvox.RemoteEarconsManager.superClass_.nextEarcons.call(this, announce);
|
| + cvox.ExtensionBridge.send({
|
| + 'target': 'EARCON',
|
| + 'action': 'nextEarcons'});
|
| + };
|
| +
|
| +} else {
|
| + cvox.RemoteEarconsManager = function() {};
|
| +}
|
|
|
| Property changes on: chrome/browser/resources/access_chromevox/audio/common/remote_earcons_manager.js
|
| ___________________________________________________________________
|
| Added: svn:executable
|
| + *
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|