| 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 0d2183c970466678700f506f1af19fb32f677b3a..2bbf729cdb68d0b11943e77e54349e7af5f714f7 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
|
| @@ -2,14 +2,16 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -/** @fileoverview Sends braille content to a content script if the braille
|
| - * captions feature is enabled.
|
| +/** @fileoverview If the braille captions feature is enabled, sends
|
| + * braille content to the Panel on Chrome OS, or a content script on
|
| + * other platforms.
|
| */
|
|
|
| goog.provide('cvox.BrailleCaptionsBackground');
|
|
|
| goog.require('cvox.BrailleDisplayState');
|
| goog.require('cvox.ExtensionBridge');
|
| +goog.require('cvox.PanelCommand');
|
|
|
| /**
|
| * Key set in local storage when this feature is enabled.
|
| @@ -65,11 +67,19 @@ cvox.BrailleCaptionsBackground.setContent = function(text, cells) {
|
| brailleChars += String.fromCharCode(
|
| self.BRAILLE_UNICODE_BLOCK_START | byteBuf[i]);
|
| }
|
| - cvox.ExtensionBridge.send({
|
| - message: 'BRAILLE_CAPTION',
|
| - text: text,
|
| - brailleChars: brailleChars
|
| - });
|
| +
|
| + if (cvox.ChromeVox.isChromeOS) {
|
| + (new cvox.PanelCommand(
|
| + cvox.PanelCommandType.UPDATE_BRAILLE_TEXT, text)).send();
|
| + (new cvox.PanelCommand(
|
| + cvox.PanelCommandType.UPDATE_BRAILLE_CELLS, brailleChars)).send();
|
| + } else {
|
| + cvox.ExtensionBridge.send({
|
| + message: 'BRAILLE_CAPTION',
|
| + text: text,
|
| + brailleChars: brailleChars
|
| + });
|
| + }
|
| };
|
|
|
|
|
|
|