| 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 Basic facillities to handle events from a single automation | 6 * @fileoverview Basic facillities to handle events from a single automation |
| 7 * node. | 7 * node. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 goog.provide('BaseAutomationHandler'); | 10 goog.provide('BaseAutomationHandler'); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Maps an automation event to its listener. | 28 * Maps an automation event to its listener. |
| 29 * @type {!Object<EventType, function(!AutomationEvent) : void>} | 29 * @type {!Object<EventType, function(!AutomationEvent) : void>} |
| 30 */ | 30 */ |
| 31 this.listenerMap_ = { | 31 this.listenerMap_ = { |
| 32 alert: this.onAlert, | 32 alert: this.onAlert, |
| 33 focus: this.onFocus, | 33 focus: this.onFocus, |
| 34 hover: this.onEventDefault, | 34 hover: this.onEventDefault, |
| 35 loadComplete: this.onLoadComplete, | 35 loadComplete: this.onLoadComplete, |
| 36 menuListItemSelected: this.onEventDefault, |
| 36 menuStart: this.onEventDefault, | 37 menuStart: this.onEventDefault, |
| 37 menuEnd: this.onEventDefault, | 38 menuEnd: this.onEventDefault, |
| 38 selection: this.onEventDefault, | 39 selection: this.onEventDefault, |
| 39 scrollPositionChanged: this.onScrollPositionChanged, | 40 scrollPositionChanged: this.onScrollPositionChanged, |
| 40 textChanged: this.onTextChanged, | 41 textChanged: this.onTextChanged, |
| 41 textSelectionChanged: this.onTextSelectionChanged, | 42 textSelectionChanged: this.onTextSelectionChanged, |
| 42 valueChanged: this.onValueChanged | 43 valueChanged: this.onValueChanged |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 /** @type {!Object<string, function(!AutomationEvent): void>} @private */ | 46 /** @type {!Object<string, function(!AutomationEvent): void>} @private */ |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 */ | 138 */ |
| 138 onTextSelectionChanged: function(evt) {}, | 139 onTextSelectionChanged: function(evt) {}, |
| 139 | 140 |
| 140 /** | 141 /** |
| 141 * @param {!AutomationEvent} evt | 142 * @param {!AutomationEvent} evt |
| 142 */ | 143 */ |
| 143 onValueChanged: function(evt) {} | 144 onValueChanged: function(evt) {} |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 }); // goog.scope | 147 }); // goog.scope |
| OLD | NEW |