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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js

Issue 2486293002: Add keyboard explorer improvements for braille (Closed)
Patch Set: Indents and braille cap cond Created 4 years, 1 month 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
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js
index ff080afff4f61f0bacd452948c45c9d8f981624c..5a6ad4e099ea56e1216e008e6a44f69d8595a620 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js
@@ -11,10 +11,12 @@ goog.provide('PanelMenuItem');
/**
* @param {string} menuItemTitle The title of the menu item.
* @param {string} menuItemShortcut The keystrokes to select this item.
+ * @param {string} menuItemBraille The braille keystrokes to select this item.
* @param {Function} callback The function to call if this item is selected.
* @constructor
*/
-PanelMenuItem = function(menuItemTitle, menuItemShortcut, callback) {
+PanelMenuItem = function(
+ menuItemTitle, menuItemShortcut, menuItemBraille, callback) {
this.callback = callback;
this.element = document.createElement('tr');
@@ -35,6 +37,13 @@ PanelMenuItem = function(menuItemTitle, menuItemShortcut, callback) {
shortcut.className = 'menu-item-shortcut';
shortcut.textContent = menuItemShortcut;
this.element.appendChild(shortcut);
+
+ if (localStorage['brailleCaptions'] === String(true)) {
+ var braille = document.createElement('td');
+ braille.className = 'menu-item-shortcut';
+ braille.textContent = menuItemBraille;
+ this.element.appendChild(braille);
+ }
};
PanelMenuItem.prototype = {

Powered by Google App Engine
This is Rietveld 408576698