Chromium Code Reviews| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 var actionNode = current.start.node; | 479 var actionNode = current.start.node; |
| 480 if (actionNode.role == RoleType.inlineTextBox) | 480 if (actionNode.role == RoleType.inlineTextBox) |
| 481 actionNode = actionNode.parent; | 481 actionNode = actionNode.parent; |
| 482 actionNode.focus(); | 482 actionNode.focus(); |
| 483 | 483 |
| 484 var prevRange = this.currentRange_; | 484 var prevRange = this.currentRange_; |
| 485 this.setCurrentRange(current); | 485 this.setCurrentRange(current); |
| 486 | 486 |
| 487 new Output().withSpeechAndBraille( | 487 new Output().withSpeechAndBraille( |
| 488 this.currentRange_, prevRange, Output.EventType.NAVIGATE) | 488 this.currentRange_, prevRange, Output.EventType.NAVIGATE) |
| 489 .withQueueMode(cvox.QueueMode.FLUSH) | |
|
David Tseng
2015/12/10 21:20:55
Flushing's done here; when there's no current rang
| |
| 489 .go(); | 490 .go(); |
| 490 } | 491 } |
| 491 | 492 |
| 492 return false; | 493 return false; |
| 493 }, | 494 }, |
| 494 | 495 |
| 495 /** | 496 /** |
| 496 * Handles key down events. | 497 * Handles key down events. |
| 497 * @param {Event} evt The key down event to process. | 498 * @param {Event} evt The key down event to process. |
| 498 * @return {boolean} True if the default action should be performed. | 499 * @return {boolean} True if the default action should be performed. |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 663 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') | 664 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') |
| 664 .replace(/\*/g, '.*') | 665 .replace(/\*/g, '.*') |
| 665 .replace(/\?/g, '.'); | 666 .replace(/\?/g, '.'); |
| 666 }).join('|') + ')$'); | 667 }).join('|') + ')$'); |
| 667 }; | 668 }; |
| 668 | 669 |
| 669 /** @type {Background} */ | 670 /** @type {Background} */ |
| 670 global.backgroundObj = new Background(); | 671 global.backgroundObj = new Background(); |
| 671 | 672 |
| 672 }); // goog.scope | 673 }); // goog.scope |
| OLD | NEW |