| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 * Maps an automation event to its listener. | 77 * Maps an automation event to its listener. |
| 78 * @type {!Object<EventType, function(Object) : void>} | 78 * @type {!Object<EventType, function(Object) : void>} |
| 79 */ | 79 */ |
| 80 this.listeners_ = { | 80 this.listeners_ = { |
| 81 alert: this.onEventDefault, | 81 alert: this.onEventDefault, |
| 82 focus: this.onFocus, | 82 focus: this.onFocus, |
| 83 hover: this.onEventDefault, | 83 hover: this.onEventDefault, |
| 84 loadComplete: this.onLoadComplete, | 84 loadComplete: this.onLoadComplete, |
| 85 menuStart: this.onEventDefault, | 85 menuStart: this.onEventDefault, |
| 86 menuEnd: this.onEventDefault, | 86 menuEnd: this.onEventDefault, |
| 87 menuListValueChanged: this.onEventDefault, | |
| 88 textChanged: this.onTextOrTextSelectionChanged, | 87 textChanged: this.onTextOrTextSelectionChanged, |
| 89 textSelectionChanged: this.onTextOrTextSelectionChanged, | 88 textSelectionChanged: this.onTextOrTextSelectionChanged, |
| 90 valueChanged: this.onValueChanged | 89 valueChanged: this.onValueChanged |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 chrome.automation.getDesktop(this.onGotDesktop); | 92 chrome.automation.getDesktop(this.onGotDesktop); |
| 94 | 93 |
| 95 // Handle messages directed to the Next background page. | 94 // Handle messages directed to the Next background page. |
| 96 cvox.ExtensionBridge.addMessageListener(function(msg, port) { | 95 cvox.ExtensionBridge.addMessageListener(function(msg, port) { |
| 97 var target = msg['target']; | 96 var target = msg['target']; |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 var start = text.getSpanStart(selectionSpan); | 738 var start = text.getSpanStart(selectionSpan); |
| 740 actionNode.setSelection(position - start, position - start); | 739 actionNode.setSelection(position - start, position - start); |
| 741 } | 740 } |
| 742 } | 741 } |
| 743 }; | 742 }; |
| 744 | 743 |
| 745 /** @type {Background} */ | 744 /** @type {Background} */ |
| 746 global.backgroundObj = new Background(); | 745 global.backgroundObj = new Background(); |
| 747 | 746 |
| 748 }); // goog.scope | 747 }); // goog.scope |
| OLD | NEW |