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

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

Issue 1457683009: Complete live region support in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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 2015 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 An interface for querying and modifying the global
7 * ChromeVox state, to avoid direct dependencies on the Background
8 * object and to facilitate mocking for tests.
9 */
10
11 goog.provide('ChromeVoxMode');
12 goog.provide('ChromeVoxState');
13
14 goog.require('cursors.Cursor');
15
16 /**
17 * All possible modes ChromeVox can run.
18 * @enum {string}
19 */
20 ChromeVoxMode = {
21 CLASSIC: 'classic',
22 COMPAT: 'compat',
23 NEXT: 'next',
24 FORCE_NEXT: 'force_next'
25 };
26
27 /**
28 * ChromeVox2 state object.
29 * @constructor
30 */
31 ChromeVoxState = function() {
32 };
33
34 ChromeVoxState.prototype = {
35 /** @type {ChromeVoxMode} */
36 get mode() {
37 return this.getMode();
38 },
39
40 /**
41 * @return {ChromeVoxMode} The current mode.
42 */
43 getMode: function() {
44 return ChromeVoxMode.NEXT;
45 },
46
47 /**
48 * Sets the current ChromeVox mode.
49 * @param {ChromeVoxMode} mode
50 * @param {boolean=} opt_injectClassic Injects ChromeVox classic into tabs;
51 * defaults to false.
52 */
53 setMode: function(mode, opt_injectClassic) {
54 },
55
56 /** @type {cursors.Range} */
57 get currentRange() {
58 return this.getCurrentRange();
59 },
60
61 /**
62 * @return {cursors.Range} The current range.
63 */
64 getCurrentRange: function() {
Peter Lundblad 2015/11/24 11:04:31 Perhaps make the get* methods private to enforce c
dmazzoni 2015/11/30 22:00:47 Done.
65 return null;
66 },
67
68 /**
69 * @param {cursors.Range} newRange The new range.
70 */
71 setCurrentRange: function(newRange) {
Peter Lundblad 2015/11/24 11:04:31 How about making all these 'stub' methods goog.abs
dmazzoni 2015/11/30 22:00:47 Done.
dmazzoni 2015/12/01 08:19:47 Hmmm, I tried this but got weird errors because th
72 },
73 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698