externs.js revision f8ee788a64d60abd8f2d742a5fdedde054ecd910
1cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com// Copyright 2014 The Chromium Authors. All rights reserved. 2cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com// Use of this source code is governed by a BSD-style license that can be 38cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com// found in the LICENSE file. 4cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com 5cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com// Common external variables when compiling ChromeVox background code 6cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com 78cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comvar localStorage = {}; 8cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com 98cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** 10cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * @type {Object} 118cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com */ 128cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.systemPrivate = {}; 138cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 148cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** 158cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com * @param {function(!Object)} callback 168cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com */ 178cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.systemPrivate.getUpdateStatus = function(callback) {}; 188cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 198cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** @type {ChromeEvent} */ 208cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.systemPrivate.onBrightnessChanged; 218cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 228cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** @type ChromeEvent */ 238cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.systemPrivate.onVolumeChanged; 248cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 258cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** @type ChromeEvent */ 268cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.systemPrivate.onScreenUnlocked; 278cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 288cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** @type ChromeEvent */ 298cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.systemPrivate.onWokeUp; 308cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 318cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 328cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** 338cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com * @type {Object} 348cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com */ 358cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.accessibilityPrivate = {}; 368cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 378cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** 388cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com * @param {boolean} on 398cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com */ 408cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.accessibilityPrivate.setAccessibilityEnabled = function(on) {}; 418cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 428cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com/** 438cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com * @param {boolean} on 448cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com */ 458cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comchrome.accessibilityPrivate.setNativeAccessibilityEnabled = function(on) { 46}; 47 48/** 49 * @param {number} tabId 50 * @param {function(Array.<!Object>)} callback 51 */ 52chrome.accessibilityPrivate.getAlertsForTab = 53 function(tabId, callback) {}; 54 55/** @type ChromeEvent */ 56chrome.accessibilityPrivate.onWindowOpened; 57 58/** @type ChromeEvent */ 59chrome.accessibilityPrivate.onWindowClosed; 60 61/** @type ChromeEvent */ 62chrome.accessibilityPrivate.onMenuOpened; 63 64/** @type ChromeEvent */ 65chrome.accessibilityPrivate.onMenuClosed; 66 67/** @type ChromeEvent */ 68chrome.accessibilityPrivate.onControlFocused; 69 70/** @type ChromeEvent */ 71chrome.accessibilityPrivate.onControlAction; 72 73/** @type ChromeEvent */ 74chrome.accessibilityPrivate.onControlHover; 75 76/** @type ChromeEvent */ 77chrome.accessibilityPrivate.onTextChanged; 78 79/** @type ChromeEvent */ 80chrome.accessibilityPrivate.onChromeVoxLoadStateChanged; 81/** @type {function()} */ 82chrome.accessibilityPrivate.onChromeVoxLoadStateChanged.destroy_; 83 84 85/** 86 * @type {Object} 87 */ 88chrome.experimental = {}; 89 90/** 91 * @type {Object} 92 * 93 * TODO(dmazzoni): Remove after the stable version of Chrome no longer 94 * has the experimental accessibility API. 95 */ 96chrome.experimental.accessibility = chrome.accessibilityPrivate; 97 98 99/** 100 * 101 */ 102chrome.app.getDetails = function() {}; 103 104/** @constructor */ 105var AccessibilityObject = function() {}; 106/** @type {string} */ 107AccessibilityObject.prototype.type; 108/** @type {string} */ 109AccessibilityObject.prototype.name; 110/** @type {Object} */ 111AccessibilityObject.prototype.details; 112/** @type {string} */ 113AccessibilityObject.prototype.details.value; 114/** @type {number} */ 115AccessibilityObject.prototype.details.selectionStart; 116/** @type {number} */ 117AccessibilityObject.prototype.details.selectionEnd; 118/** @type {number} */ 119AccessibilityObject.prototype.details.itemCount; 120/** @type {number} */ 121AccessibilityObject.prototype.details.itemIndex; 122