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(Object) : void>} | 29 * @type {!Object<EventType, function(Object) : 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 scrollPositionChanged: this.onScrollPositionChanged, |
38 textChanged: this.onTextOrTextSelectionChanged, | 39 textChanged: this.onTextOrTextSelectionChanged, |
39 textSelectionChanged: this.onTextOrTextSelectionChanged, | 40 textSelectionChanged: this.onTextOrTextSelectionChanged, |
40 valueChanged: this.onValueChanged | 41 valueChanged: this.onValueChanged |
41 }; | 42 }; |
42 | 43 |
43 /** @type {!Object<string, function(AutomationEvent): void>} @private */ | 44 /** @type {!Object<string, function(AutomationEvent): void>} @private */ |
44 this.listeners_ = {}; | 45 this.listeners_ = {}; |
45 | 46 |
46 this.register_(); | 47 this.register_(); |
47 }; | 48 }; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 108 |
108 /** | 109 /** |
109 * @param {Object} evt | 110 * @param {Object} evt |
110 */ | 111 */ |
111 onFocus: function(evt) {}, | 112 onFocus: function(evt) {}, |
112 | 113 |
113 /** | 114 /** |
114 * @param {Object} evt | 115 * @param {Object} evt |
115 */ | 116 */ |
116 onLoadComplete: function(evt) {}, | 117 onLoadComplete: function(evt) {}, |
| 118 |
| 119 /** |
| 120 * @param {Object} evt |
| 121 */ |
117 onEventDefault: function(evt) {}, | 122 onEventDefault: function(evt) {}, |
118 | 123 |
119 /** | 124 /** |
120 * @param {Object} evt | 125 * @param {Object} evt |
121 */ | 126 */ |
| 127 onScrollPositionChanged: function(evt) {}, |
| 128 |
| 129 /** |
| 130 * @param {Object} evt |
| 131 */ |
122 onTextOrTextSelectionChanged: function(evt) {}, | 132 onTextOrTextSelectionChanged: function(evt) {}, |
123 | 133 |
124 /** | 134 /** |
125 * @param {Object} evt | 135 * @param {Object} evt |
126 */ | 136 */ |
127 onValueChanged: function(evt) {} | 137 onValueChanged: function(evt) {} |
128 }; | 138 }; |
129 | 139 |
130 }); // goog.scope | 140 }); // goog.scope |
OLD | NEW |