Home | History | Annotate | Download | only in background
      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.
      4 
      5 // Common external variables when compiling ChromeVox background code
      6 
      7 var localStorage = {};
      8 
      9 /**
     10  * @type {Object}
     11  */
     12 chrome.systemPrivate = {};
     13 
     14 /**
     15  * @param {function(!Object)} callback
     16  */
     17 chrome.systemPrivate.getUpdateStatus = function(callback) {};
     18 
     19 /** @type {ChromeEvent} */
     20 chrome.systemPrivate.onBrightnessChanged;
     21 
     22 /** @type ChromeEvent */
     23 chrome.systemPrivate.onVolumeChanged;
     24 
     25 /** @type ChromeEvent */
     26 chrome.systemPrivate.onScreenUnlocked;
     27 
     28 /** @type ChromeEvent */
     29 chrome.systemPrivate.onWokeUp;
     30 
     31 
     32 /**
     33  * @type {Object}
     34  */
     35 chrome.accessibilityPrivate = {};
     36 
     37 /**
     38  * @param {boolean} on
     39  */
     40 chrome.accessibilityPrivate.setAccessibilityEnabled = function(on) {};
     41 
     42 /**
     43  * @param {boolean} on
     44  */
     45 chrome.accessibilityPrivate.setNativeAccessibilityEnabled = function(on) {
     46 };
     47 
     48 /**
     49  * @param {number} tabId
     50  * @param {function(Array.<!Object>)} callback
     51  */
     52 chrome.accessibilityPrivate.getAlertsForTab =
     53     function(tabId, callback) {};
     54 
     55 /**
     56  * @param {Array.<{left: number, top: number, width: number, height: number}>}
     57  *     rects The bounding rects to draw focus ring(s) around, in global
     58  *     screen coordinates.
     59  */
     60 chrome.accessibilityPrivate.setFocusRing = function(rects) {
     61 };
     62 
     63 /** @type ChromeEvent */
     64 chrome.accessibilityPrivate.onWindowOpened;
     65 
     66 /** @type ChromeEvent */
     67 chrome.accessibilityPrivate.onWindowClosed;
     68 
     69 /** @type ChromeEvent */
     70 chrome.accessibilityPrivate.onMenuOpened;
     71 
     72 /** @type ChromeEvent */
     73 chrome.accessibilityPrivate.onMenuClosed;
     74 
     75 /** @type ChromeEvent */
     76 chrome.accessibilityPrivate.onControlFocused;
     77 
     78 /** @type ChromeEvent */
     79 chrome.accessibilityPrivate.onControlAction;
     80 
     81 /** @type ChromeEvent */
     82 chrome.accessibilityPrivate.onControlHover;
     83 
     84 /** @type ChromeEvent */
     85 chrome.accessibilityPrivate.onTextChanged;
     86 
     87 /** @type ChromeEvent */
     88 chrome.accessibilityPrivate.onChromeVoxLoadStateChanged;
     89 /** @type {function()} */
     90 chrome.accessibilityPrivate.onChromeVoxLoadStateChanged.destroy_;
     91 
     92 
     93 /**
     94  * @type {Object}
     95  */
     96 chrome.experimental = {};
     97 
     98 /**
     99  * @type {Object}
    100  *
    101  * TODO(dmazzoni): Remove after the stable version of Chrome no longer
    102  * has the experimental accessibility API.
    103  */
    104 chrome.experimental.accessibility = chrome.accessibilityPrivate;
    105 
    106 
    107 /**
    108  *
    109  */
    110 chrome.app.getDetails = function() {};
    111 
    112 /** @constructor */
    113 var AccessibilityObject = function() {};
    114 /** @type {string} */
    115 AccessibilityObject.prototype.type;
    116 /** @type {string} */
    117 AccessibilityObject.prototype.name;
    118 /** @type {Object} */
    119 AccessibilityObject.prototype.details;
    120 /** @type {string} */
    121 AccessibilityObject.prototype.details.value;
    122 /** @type {number} */
    123 AccessibilityObject.prototype.details.selectionStart;
    124 /** @type {number} */
    125 AccessibilityObject.prototype.details.selectionEnd;
    126 /** @type {number} */
    127 AccessibilityObject.prototype.details.itemCount;
    128 /** @type {number} */
    129 AccessibilityObject.prototype.details.itemIndex;
    130