| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |