| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 Keeps track of the current braille translators. | 6 * @fileoverview Keeps track of the current braille translators. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 goog.provide('cvox.BrailleTranslatorManager'); | 9 goog.provide('cvox.BrailleTranslatorManager'); |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 /** | 185 /** |
| 186 * Asynchronously fetches the list of braille tables and refreshes the | 186 * Asynchronously fetches the list of braille tables and refreshes the |
| 187 * translators when done. | 187 * translators when done. |
| 188 * @private | 188 * @private |
| 189 */ | 189 */ |
| 190 fetchTables_: function() { | 190 fetchTables_: function() { |
| 191 cvox.BrailleTable.getAll(function(tables) { | 191 cvox.BrailleTable.getAll(function(tables) { |
| 192 this.tables_ = tables; | 192 this.tables_ = tables; |
| 193 | 193 |
| 194 // Initial refresh; set options from user preferences. | 194 // Initial refresh; set options from user preferences. |
| 195 this.refresh(localStorage['brailleTable'], localStorage['brailleTable8']); | 195 this.refresh(localStorage['brailleTable']); |
| 196 }.bind(this)); | 196 }.bind(this)); |
| 197 }, | 197 }, |
| 198 | 198 |
| 199 /** | 199 /** |
| 200 * Loads the liblouis instance by attaching it to the document. | 200 * Loads the liblouis instance by attaching it to the document. |
| 201 * @private | 201 * @private |
| 202 */ | 202 */ |
| 203 loadLiblouis_: function() { | 203 loadLiblouis_: function() { |
| 204 // Cast away nullability. When the document is loaded, it will always | 204 // Cast away nullability. When the document is loaded, it will always |
| 205 // have a body. | 205 // have a body. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 216 }, | 216 }, |
| 217 | 217 |
| 218 /** | 218 /** |
| 219 * @return {!Array<cvox.BrailleTable.Table>} The currently loaded braille | 219 * @return {!Array<cvox.BrailleTable.Table>} The currently loaded braille |
| 220 * tables, or an empty array if they are not yet loaded. | 220 * tables, or an empty array if they are not yet loaded. |
| 221 */ | 221 */ |
| 222 getTablesForTest: function() { | 222 getTablesForTest: function() { |
| 223 return this.tables_; | 223 return this.tables_; |
| 224 } | 224 } |
| 225 }; | 225 }; |
| OLD | NEW |