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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 2486293002: Add keyboard explorer improvements for braille (Closed)
Patch Set: Add stuff to panel.. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview The entry point for all ChromeVox2 related code for the 6 * @fileoverview The entry point for all ChromeVox2 related code for the
7 * background page. 7 * background page.
8 */ 8 */
9 9
10 goog.provide('Background'); 10 goog.provide('Background');
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 /** 171 /**
172 * Maps a non-desktop root automation node to a range position suitable for 172 * Maps a non-desktop root automation node to a range position suitable for
173 * restoration. 173 * restoration.
174 * @type {WeakMap<AutomationNode, cursors.Range>} 174 * @type {WeakMap<AutomationNode, cursors.Range>}
175 * @private 175 * @private
176 */ 176 */
177 this.focusRecoveryMap_ = new WeakMap(); 177 this.focusRecoveryMap_ = new WeakMap();
178 }; 178 };
179 179
180 /** 180 /**
181 * @const {string}
182 */
183 Background.ISSUE_URL = 'https://code.google.com/p/chromium/issues/entry?' +
dmazzoni 2016/11/10 01:22:04 Did you mean to delete this as part of this change
David Tseng 2016/11/10 04:56:58 Acknowledged.
184 'labels=Type-Bug,Pri-2,cvox2,OS-Chrome&' +
185 'components=UI>accessibility&' +
186 'description=';
187
188 /**
189 * Map from gesture names (AXGesture defined in ui/accessibility/ax_enums.idl) 181 * Map from gesture names (AXGesture defined in ui/accessibility/ax_enums.idl)
190 * to commands when in Classic mode. 182 * to commands when in Classic mode.
191 * @type {Object<string, string>} 183 * @type {Object<string, string>}
192 * @const 184 * @const
193 */ 185 */
194 Background.GESTURE_CLASSIC_COMMAND_MAP = { 186 Background.GESTURE_CLASSIC_COMMAND_MAP = {
195 'click': 'forceClickOnCurrentItem', 187 'click': 'forceClickOnCurrentItem',
196 'swipeUp1': 'backward', 188 'swipeUp1': 'backward',
197 'swipeDown1': 'forward', 189 'swipeDown1': 'forward',
198 'swipeLeft1': 'left', 190 'swipeLeft1': 'left',
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 case cvox.BrailleKeyCommand.ROUTING: 537 case cvox.BrailleKeyCommand.ROUTING:
546 this.brailleRoutingCommand_( 538 this.brailleRoutingCommand_(
547 content.text, 539 content.text,
548 // Cast ok since displayPosition is always defined in this case. 540 // Cast ok since displayPosition is always defined in this case.
549 /** @type {number} */ (evt.displayPosition)); 541 /** @type {number} */ (evt.displayPosition));
550 break; 542 break;
551 case cvox.BrailleKeyCommand.CHORD: 543 case cvox.BrailleKeyCommand.CHORD:
552 if (!evt.brailleDots) 544 if (!evt.brailleDots)
553 return false; 545 return false;
554 546
555 BrailleCommandHandler.onBrailleCommand(evt.brailleDots); 547 var command = BrailleCommandHandler.getCommand(evt.brailleDots);
548 if (command)
549 CommandHandler.onCommand(command);
556 break; 550 break;
557 default: 551 default:
558 return false; 552 return false;
559 } 553 }
560 return true; 554 return true;
561 }, 555 },
562 556
563 /** 557 /**
564 * Returns true if the url should have Classic running. 558 * Returns true if the url should have Classic running.
565 * @return {boolean} 559 * @return {boolean}
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 return new RegExp('^(' + globs.map(function(glob) { 825 return new RegExp('^(' + globs.map(function(glob) {
832 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 826 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
833 .replace(/\*/g, '.*') 827 .replace(/\*/g, '.*')
834 .replace(/\?/g, '.'); 828 .replace(/\?/g, '.');
835 }).join('|') + ')$'); 829 }).join('|') + ')$');
836 }; 830 };
837 831
838 new Background(); 832 new Background();
839 833
840 }); // goog.scope 834 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698