| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Handles automation from a desktop automation node. | 6 * @fileoverview Handles automation from a desktop automation node. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 goog.provide('DesktopAutomationHandler'); | 9 goog.provide('DesktopAutomationHandler'); |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 * The last time we handled a value changed event. | 39 * The last time we handled a value changed event. |
| 40 * @type {!Date} | 40 * @type {!Date} |
| 41 * @private | 41 * @private |
| 42 */ | 42 */ |
| 43 this.lastValueChanged_ = new Date(0); | 43 this.lastValueChanged_ = new Date(0); |
| 44 | 44 |
| 45 var e = EventType; | 45 var e = EventType; |
| 46 this.addListener_(e.activedescendantchanged, this.onActiveDescendantChanged); | 46 this.addListener_(e.activedescendantchanged, this.onActiveDescendantChanged); |
| 47 this.addListener_(e.alert, this.onAlert); | 47 this.addListener_(e.alert, this.onAlert); |
| 48 this.addListener_(e.ariaAttributeChanged, this.onEventIfInRange); | 48 this.addListener_(e.ariaAttributeChanged, this.onEventIfInRange); |
| 49 this.addListener_(e.autocorrectionOccured, this.onEventIfInRange); |
| 49 this.addListener_(e.checkedStateChanged, this.onCheckedStateChanged); | 50 this.addListener_(e.checkedStateChanged, this.onCheckedStateChanged); |
| 50 this.addListener_(e.childrenChanged, this.onActiveDescendantChanged); | 51 this.addListener_(e.childrenChanged, this.onActiveDescendantChanged); |
| 52 this.addListener_(e.expandedChanged, this.onEventIfInRange); |
| 51 this.addListener_(e.focus, this.onFocus); | 53 this.addListener_(e.focus, this.onFocus); |
| 52 this.addListener_(e.hover, this.onHover); | 54 this.addListener_(e.hover, this.onHover); |
| 55 this.addListener_(e.invalidStatusChanged, this.onEventIfInRange); |
| 53 this.addListener_(e.loadComplete, this.onLoadComplete); | 56 this.addListener_(e.loadComplete, this.onLoadComplete); |
| 54 this.addListener_(e.menuEnd, this.onMenuEnd); | 57 this.addListener_(e.menuEnd, this.onMenuEnd); |
| 55 this.addListener_(e.menuListItemSelected, this.onEventIfSelected); | 58 this.addListener_(e.menuListItemSelected, this.onEventIfSelected); |
| 56 this.addListener_(e.menuStart, this.onMenuStart); | 59 this.addListener_(e.menuStart, this.onMenuStart); |
| 60 this.addListener_(e.rowCollapsed, this.onEventIfInRange); |
| 61 this.addListener_(e.rowExpanded, this.onEventIfInRange); |
| 57 this.addListener_(e.scrollPositionChanged, this.onScrollPositionChanged); | 62 this.addListener_(e.scrollPositionChanged, this.onScrollPositionChanged); |
| 58 this.addListener_(e.selection, this.onSelection); | 63 this.addListener_(e.selection, this.onSelection); |
| 59 this.addListener_(e.textChanged, this.onTextChanged); | 64 this.addListener_(e.textChanged, this.onTextChanged); |
| 60 this.addListener_(e.textSelectionChanged, this.onTextSelectionChanged); | 65 this.addListener_(e.textSelectionChanged, this.onTextSelectionChanged); |
| 61 this.addListener_(e.valueChanged, this.onValueChanged); | 66 this.addListener_(e.valueChanged, this.onValueChanged); |
| 62 | 67 |
| 63 AutomationObjectConstructorInstaller.init(node, function() { | 68 AutomationObjectConstructorInstaller.init(node, function() { |
| 64 chrome.automation.getFocus((function(focus) { | 69 chrome.automation.getFocus((function(focus) { |
| 65 if (ChromeVoxState.instance.mode != ChromeVoxMode.FORCE_NEXT) | 70 if (ChromeVoxState.instance.mode != ChromeVoxMode.FORCE_NEXT) |
| 66 return; | 71 return; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 DesktopAutomationHandler.init_ = function() { | 455 DesktopAutomationHandler.init_ = function() { |
| 451 chrome.automation.getDesktop(function(desktop) { | 456 chrome.automation.getDesktop(function(desktop) { |
| 452 ChromeVoxState.desktopAutomationHandler = | 457 ChromeVoxState.desktopAutomationHandler = |
| 453 new DesktopAutomationHandler(desktop); | 458 new DesktopAutomationHandler(desktop); |
| 454 }); | 459 }); |
| 455 }; | 460 }; |
| 456 | 461 |
| 457 DesktopAutomationHandler.init_(); | 462 DesktopAutomationHandler.init_(); |
| 458 | 463 |
| 459 }); // goog.scope | 464 }); // goog.scope |
| OLD | NEW |