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

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

Issue 1460913005: Fix ChromeVox Classic keyboard handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 410
411 return false; 411 return false;
412 }, 412 },
413 413
414 /** 414 /**
415 * Handles key down events. 415 * Handles key down events.
416 * @param {Event} evt The key down event to process. 416 * @param {Event} evt The key down event to process.
417 * @return {boolean} True if the default action should be performed. 417 * @return {boolean} True if the default action should be performed.
418 */ 418 */
419 onKeyDown: function(evt) { 419 onKeyDown: function(evt) {
420 if (!cvox.ChromeVoxKbHandler.basicKeyDownActionsListener(evt)) { 420 if (this.mode_ != ChromeVoxMode.CLASSIC &&
421 !cvox.ChromeVoxKbHandler.basicKeyDownActionsListener(evt)) {
421 evt.preventDefault(); 422 evt.preventDefault();
422 evt.stopPropagation(); 423 evt.stopPropagation();
423 } 424 }
424 }, 425 },
425 426
426 /** 427 /**
427 * Open the options page in a new tab. 428 * Open the options page in a new tab.
428 */ 429 */
429 showOptionsPage: function() { 430 showOptionsPage: function() {
430 var optionsPage = {url: 'chromevox/background/options.html'}; 431 var optionsPage = {url: 'chromevox/background/options.html'};
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 683 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
683 .replace(/\*/g, '.*') 684 .replace(/\*/g, '.*')
684 .replace(/\?/g, '.'); 685 .replace(/\?/g, '.');
685 }).join('|') + ')$'); 686 }).join('|') + ')$');
686 }; 687 };
687 688
688 /** @type {Background} */ 689 /** @type {Background} */
689 global.backgroundObj = new Background(); 690 global.backgroundObj = new Background();
690 691
691 }); // goog.scope 692 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698