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

Unified Diff: chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js

Issue 589133002: Make undefined Unicode characters show up in a nicer way in braille. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moretables
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/liblouis/README.chromium » ('j') | third_party/liblouis/README.chromium » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
diff --git a/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js b/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
index e3689000ce96a61150003362d43ffa1f42bb2daa..b6534f321dccab0a355a0a4ab05fa4e7abfbddca 100644
--- a/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
+++ b/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
@@ -29,10 +29,24 @@ cvox.BrailleTable.TABLE_PATH = 'chromevox/background/braille/tables.json';
/**
+ * @const {string}
+ * @private
+ */
+cvox.BrailleTable.COMMON_DEFS_FILENAME_ = 'cvox-common.cti';
+
+
+/**
* Retrieves a list of all available braille tables.
* @param {function(!Array.<cvox.BrailleTable.Table>)} callback
*/
cvox.BrailleTable.getAll = function(callback) {
+ function fixFilenames(tables) {
David Tseng 2014/09/22 17:53:05 Maybe appendCommonFile? (there's nothing wrong wit
+ // Append the common definitions to all table filenames.
+ tables.forEach(function(table) {
+ table.fileName += (',' + cvox.BrailleTable.COMMON_DEFS_FILENAME_);
David Tseng 2014/09/22 17:53:05 Can we just load the common table once elsewhere r
+ });
+ return tables;
+ }
var url = chrome.extension.getURL(cvox.BrailleTable.TABLE_PATH);
if (!url) {
throw 'Invalid path: ' + cvox.BrailleTable.TABLE_PATH;
@@ -43,8 +57,10 @@ cvox.BrailleTable.getAll = function(callback) {
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
- callback(/** @type {!Array.<cvox.BrailleTable.Table>} */ (
- JSON.parse(xhr.responseText)));
+ callback(
+ fixFilenames(
+ /** @type {!Array.<cvox.BrailleTable.Table>} */ (
+ JSON.parse(xhr.responseText))));
}
}
};
« no previous file with comments | « no previous file | third_party/liblouis/README.chromium » ('j') | third_party/liblouis/README.chromium » ('J')

Powered by Google App Engine
This is Rietveld 408576698