| Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/braille_captions_background.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/braille_captions_background.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/braille_captions_background.js
|
| index a1d1cc198c9b3218e6ec7f62b07416913d95b5f9..70f82bc21a32520938d8e212f0a37278bb6ad2f4 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/braille_captions_background.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/braille_captions_background.js
|
| @@ -86,6 +86,31 @@ cvox.BrailleCaptionsBackground.setContent = function(text, cells,
|
| };
|
|
|
| /**
|
| + * @param {ArrayBuffer} cells Braille cells shown on the display.
|
| + * @param {number} rows Number of rows to display.
|
| + * @param {number} columns Number of columns to display.
|
| + */
|
| +cvox.BrailleCaptionsBackground.setImageContent = function(cells, rows,
|
| + columns) {
|
| + var self = cvox.BrailleCaptionsBackground;
|
| + // Convert the cells to Unicode braille pattern characters.
|
| + var byteBuf = new Uint8Array(cells);
|
| + var brailleChars = '';
|
| +
|
| + for (var i = 0; i < byteBuf.length; ++i) {
|
| + brailleChars += String.fromCharCode(
|
| + self.BRAILLE_UNICODE_BLOCK_START | byteBuf[i]);
|
| + }
|
| +
|
| + var groups = [['Image', brailleChars]];
|
| + var data = {groups: groups, rows: rows, cols: columns};
|
| + (new PanelCommand(PanelCommandType.UPDATE_BRAILLE, data)).send();
|
| +};
|
| +
|
| +
|
| +
|
| +
|
| +/**
|
| * @param {string} brailleChars Braille characters shown on the display.
|
| * @param {string} text Text of the shown braille.
|
| * @param {Array<number>} brailleToText Map of Braille letters to the first
|
|
|