| Index: chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js b/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
|
| index ddd3b8bcb7daca98140161105591301f0e9ffc83..a0c02f2f40a04840e7a16691ebecaaa7946d40d2 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
|
| @@ -7,7 +7,7 @@
|
| */
|
|
|
| goog.provide('cvox.LibLouis');
|
| -
|
| +goog.provide('cvox.LibLouis.FormType');
|
|
|
| /**
|
| * Encapsulates a liblouis Native Client instance in the page.
|
| @@ -49,6 +49,20 @@ cvox.LibLouis = function(nmfPath, opt_tablesDir) {
|
| };
|
|
|
|
|
| +/**
|
| + * Constants taken from liblouis.h.
|
| + * Controls braille indicator insertion during translation.
|
| + * @enum {number}
|
| + */
|
| +cvox.LibLouis.FormType = {
|
| + PLAIN_TEXT: 0,
|
| + ITALIC: 1,
|
| + UNDERLINE: 2,
|
| + BOLD: 4,
|
| + COMPUTER_BRAILLE: 8
|
| +};
|
| +
|
| +
|
| /**
|
| * Set to {@code true} to enable debug logging of RPC messages.
|
| * @type {boolean}
|
| @@ -239,12 +253,17 @@ cvox.LibLouis.Translator = function(instance, tableNames) {
|
| * text positions. If translation fails for any reason, all parameters are
|
| * {@code null}.
|
| */
|
| -cvox.LibLouis.Translator.prototype.translate = function(text, callback) {
|
| +cvox.LibLouis.Translator.prototype.translate = function(
|
| + text, formTypeMap, callback) {
|
| if (!this.instance_.isAttached()) {
|
| callback(null /*cells*/, null /*textToBraille*/, null /*brailleToText*/);
|
| return;
|
| }
|
| - var message = {'table_names': this.tableNames_, 'text': text};
|
| + var message = {
|
| + 'table_names': this.tableNames_,
|
| + 'text': text,
|
| + form_type_map: formTypeMap
|
| + };
|
| this.instance_.rpc_('Translate', message, function(reply) {
|
| var cells = null;
|
| var textToBraille = null;
|
|
|