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

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

Issue 2342093002: Change the category of "show braille captions" so it shows up in ChromeVox menus (Closed)
Patch Set: Created 4 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 | chrome/browser/resources/chromeos/chromevox/chromevox/injected/keyboard_handler.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.js
index 70a412827ef32441836f64d110259d2affe622ff..16a5427f5e2a0e46170608b40eb357e2c62e22b9 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.js
@@ -96,8 +96,13 @@ cvox.KbExplorer.onKeyPress = function(evt) {
/**
* Queues up command description.
* @param {string} command
+ * @return {boolean|undefined} True if command existed and was handled.
*/
cvox.KbExplorer.onCommand = function(command) {
- var commandText = Msgs.getMsg(cvox.CommandStore.messageForCommand(command));
- chrome.extension.getBackgroundPage()['speak'](commandText);
+ var msg = cvox.CommandStore.messageForCommand(command);
+ if (msg) {
+ var commandText = Msgs.getMsg(msg);
+ chrome.extension.getBackgroundPage()['speak'](commandText);
+ return true;
+ }
};
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/injected/keyboard_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698