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 17 matching lines...) Expand all Loading... |
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 menuStart: this.onEventDefault, | 36 menuStart: this.onEventDefault, |
37 menuEnd: this.onEventDefault, | 37 menuEnd: this.onEventDefault, |
| 38 selection: this.onEventDefault, |
38 scrollPositionChanged: this.onScrollPositionChanged, | 39 scrollPositionChanged: this.onScrollPositionChanged, |
39 textChanged: this.onTextChanged, | 40 textChanged: this.onTextChanged, |
40 textSelectionChanged: this.onTextSelectionChanged, | 41 textSelectionChanged: this.onTextSelectionChanged, |
41 valueChanged: this.onValueChanged | 42 valueChanged: this.onValueChanged |
42 }; | 43 }; |
43 | 44 |
44 /** @type {!Object<string, function(!AutomationEvent): void>} @private */ | 45 /** @type {!Object<string, function(!AutomationEvent): void>} @private */ |
45 this.listeners_ = {}; | 46 this.listeners_ = {}; |
46 | 47 |
47 this.register_(); | 48 this.register_(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 */ | 137 */ |
137 onTextSelectionChanged: function(evt) {}, | 138 onTextSelectionChanged: function(evt) {}, |
138 | 139 |
139 /** | 140 /** |
140 * @param {!AutomationEvent} evt | 141 * @param {!AutomationEvent} evt |
141 */ | 142 */ |
142 onValueChanged: function(evt) {} | 143 onValueChanged: function(evt) {} |
143 }; | 144 }; |
144 | 145 |
145 }); // goog.scope | 146 }); // goog.scope |
OLD | NEW |