| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 break; | 457 break; |
| 458 case 'jumpToBottom': | 458 case 'jumpToBottom': |
| 459 var node = | 459 var node = |
| 460 AutomationUtil.findNodePost(current.start.node.root, | 460 AutomationUtil.findNodePost(current.start.node.root, |
| 461 Dir.BACKWARD, | 461 Dir.BACKWARD, |
| 462 AutomationPredicate.leaf); | 462 AutomationPredicate.leaf); |
| 463 if (node) | 463 if (node) |
| 464 current = cursors.Range.fromNode(node); | 464 current = cursors.Range.fromNode(node); |
| 465 break; | 465 break; |
| 466 case 'forceClickOnCurrentItem': | 466 case 'forceClickOnCurrentItem': |
| 467 case 'performDefaultAction': | |
| 468 if (this.currentRange_) { | 467 if (this.currentRange_) { |
| 469 var actionNode = this.currentRange_.start.node; | 468 var actionNode = this.currentRange_.start.node; |
| 470 if (actionNode.role == RoleType.inlineTextBox) | 469 if (actionNode.role == RoleType.inlineTextBox) |
| 471 actionNode = actionNode.parent; | 470 actionNode = actionNode.parent; |
| 472 actionNode.doDefault(); | 471 actionNode.doDefault(); |
| 473 } | 472 } |
| 474 // Skip all other processing; if focus changes, we should get an event | 473 // Skip all other processing; if focus changes, we should get an event |
| 475 // for that. | 474 // for that. |
| 476 return false; | 475 return false; |
| 477 case 'readFromHere': | 476 case 'readFromHere': |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') | 1006 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') |
| 1008 .replace(/\*/g, '.*') | 1007 .replace(/\*/g, '.*') |
| 1009 .replace(/\?/g, '.'); | 1008 .replace(/\?/g, '.'); |
| 1010 }).join('|') + ')$'); | 1009 }).join('|') + ')$'); |
| 1011 }; | 1010 }; |
| 1012 | 1011 |
| 1013 /** @type {Background} */ | 1012 /** @type {Background} */ |
| 1014 global.backgroundObj = new Background(); | 1013 global.backgroundObj = new Background(); |
| 1015 | 1014 |
| 1016 }); // goog.scope | 1015 }); // goog.scope |
| OLD | NEW |