OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview An interface for querying and modifying the global | 6 * @fileoverview An interface for querying and modifying the global |
7 * ChromeVox state, to avoid direct dependencies on the Background | 7 * ChromeVox state, to avoid direct dependencies on the Background |
8 * object and to facilitate mocking for tests. | 8 * object and to facilitate mocking for tests. |
9 */ | 9 */ |
10 | 10 |
11 goog.provide('ChromeVoxMode'); | 11 goog.provide('ChromeVoxMode'); |
12 goog.provide('ChromeVoxState'); | 12 goog.provide('ChromeVoxState'); |
13 | 13 |
14 goog.require('cursors.Cursor'); | 14 goog.require('cursors.Cursor'); |
15 | 15 |
16 /** | 16 /** |
17 * All possible modes ChromeVox can run. | 17 * All possible modes ChromeVox can run. |
18 * @enum {string} | 18 * @enum {string} |
19 */ | 19 */ |
20 ChromeVoxMode = { | 20 ChromeVoxMode = { |
21 CLASSIC: 'classic', | 21 CLASSIC: 'classic', |
22 CLASSIC_COMPAT: 'classic_compat', | 22 CLASSIC_COMPAT: 'classic_compat', |
23 NEXT: 'next', | 23 NEXT: 'next', |
24 NEXT_COMPAT: 'next_compat', | |
25 FORCE_NEXT: 'force_next' | 24 FORCE_NEXT: 'force_next' |
26 }; | 25 }; |
27 | 26 |
28 /** | 27 /** |
29 * ChromeVox2 state object. | 28 * ChromeVox2 state object. |
30 * @constructor | 29 * @constructor |
31 */ | 30 */ |
32 ChromeVoxState = function() { | 31 ChromeVoxState = function() { |
33 if (ChromeVoxState.instance) | 32 if (ChromeVoxState.instance) |
34 throw 'Trying to create two instances of singleton ChromeVoxState.'; | 33 throw 'Trying to create two instances of singleton ChromeVoxState.'; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 */ | 75 */ |
77 getCurrentRange: function() { | 76 getCurrentRange: function() { |
78 return null; | 77 return null; |
79 }, | 78 }, |
80 | 79 |
81 /** | 80 /** |
82 * @param {cursors.Range} newRange The new range. | 81 * @param {cursors.Range} newRange The new range. |
83 */ | 82 */ |
84 setCurrentRange: goog.abstractMethod, | 83 setCurrentRange: goog.abstractMethod, |
85 }; | 84 }; |
OLD | NEW |