| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 else | 510 else |
| 511 chrome.accessibilityPrivate.setKeyboardListener(true, false); | 511 chrome.accessibilityPrivate.setKeyboardListener(true, false); |
| 512 return false; | 512 return false; |
| 513 case 'passThroughMode': | 513 case 'passThroughMode': |
| 514 cvox.ChromeVox.passThroughMode = true; | 514 cvox.ChromeVox.passThroughMode = true; |
| 515 cvox.ChromeVox.tts.speak( | 515 cvox.ChromeVox.tts.speak( |
| 516 Msgs.getMsg('pass_through_key'), cvox.QueueMode.QUEUE); | 516 Msgs.getMsg('pass_through_key'), cvox.QueueMode.QUEUE); |
| 517 return true; | 517 return true; |
| 518 case 'openChromeVoxMenus': | 518 case 'openChromeVoxMenus': |
| 519 (new PanelCommand(PanelCommandType.OPEN_MENUS)).send(); | 519 (new PanelCommand(PanelCommandType.OPEN_MENUS)).send(); |
| 520 break; | 520 return false; |
| 521 case 'decreaseTtsRate': | 521 case 'decreaseTtsRate': |
| 522 this.increaseOrDecreaseSpeechProperty_(cvox.AbstractTts.RATE, false); | 522 this.increaseOrDecreaseSpeechProperty_(cvox.AbstractTts.RATE, false); |
| 523 break; | 523 break; |
| 524 case 'increaseTtsRate': | 524 case 'increaseTtsRate': |
| 525 this.increaseOrDecreaseSpeechProperty_(cvox.AbstractTts.RATE, true); | 525 this.increaseOrDecreaseSpeechProperty_(cvox.AbstractTts.RATE, true); |
| 526 break; | 526 break; |
| 527 case 'decreaseTtsPitch': | 527 case 'decreaseTtsPitch': |
| 528 this.increaseOrDecreaseSpeechProperty_(cvox.AbstractTts.PITCH, false); | 528 this.increaseOrDecreaseSpeechProperty_(cvox.AbstractTts.PITCH, false); |
| 529 break; | 529 break; |
| 530 case 'increaseTtsPitch': | 530 case 'increaseTtsPitch': |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') | 832 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') |
| 833 .replace(/\*/g, '.*') | 833 .replace(/\*/g, '.*') |
| 834 .replace(/\?/g, '.'); | 834 .replace(/\?/g, '.'); |
| 835 }).join('|') + ')$'); | 835 }).join('|') + ')$'); |
| 836 }; | 836 }; |
| 837 | 837 |
| 838 /** @type {Background} */ | 838 /** @type {Background} */ |
| 839 global.backgroundObj = new Background(); | 839 global.backgroundObj = new Background(); |
| 840 | 840 |
| 841 }); // goog.scope | 841 }); // goog.scope |
| OLD | NEW |