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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/stubs.js

Issue 2768703002: Wire up an api to darken screen for accessibility (Closed)
Patch Set: Rebase. Created 3 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2016 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 Installs stubs for unsupported api's on some platforms. Define
7 * the stubs here and require Stubs in the calling file.
8 */
9
10 goog.provide('Stubs');
11
12 goog.require('cvox.ChromeVox');
13
14 /** Initializes this module. */
15 Stubs.init = function() {
16 // These api's throw for non-Chrome OS.
17 if (!cvox.ChromeVox.isChromeOS) {
18 chrome.accessibilityPrivate.onAccessibilityGesture = {};
19 chrome.accessibilityPrivate.onAccessibilityGesture.addListener =
20 function() {};
21 chrome.accessibilityPrivate.setFocusRing = function() {};
22 chrome.accessibilityPrivate.setKeyboardListener = function() {};
23 }
24
25 // This api throws on Mac.
26 if (cvox.ChromeVox.isMac) {
27 chrome.automation.getDesktop = function() {};
28 }
29
30 // Missing api's until 53.
31 if (!chrome.automation.NameFromType) {
32 chrome.automation['NameFromType'] = {};
33 chrome.automation['DescriptionFromType'] = {};
34 }
35 };
36
37 Stubs.init();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698