| OLD | NEW |
| 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. |
| 2 // limitations under the License. | 2 // limitations under the License. |
| 3 // See the License for the specific language governing permissions and | 3 // See the License for the specific language governing permissions and |
| 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 5 // distributed under the License is distributed on an "AS-IS" BASIS, | 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
| 6 // Unless required by applicable law or agreed to in writing, software | 6 // Unless required by applicable law or agreed to in writing, software |
| 7 // | 7 // |
| 8 // http://www.apache.org/licenses/LICENSE-2.0 | 8 // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 // | 9 // |
| 10 // You may obtain a copy of the License at | 10 // You may obtain a copy of the License at |
| 11 // you may not use this file except in compliance with the License. | 11 // you may not use this file except in compliance with the License. |
| 12 // Licensed under the Apache License, Version 2.0 (the "License"); | 12 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 13 // | 13 // |
| 14 goog.provide('i18n.input.chrome.inputview.events.ConfigLoadedEvent'); | 14 goog.provide('i18n.input.chrome.inputview.events.ConfigLoadedEvent'); |
| 15 goog.provide('i18n.input.chrome.inputview.events.ContextUpdateEvent'); | 15 goog.provide('i18n.input.chrome.inputview.events.ContextUpdateEvent'); |
| 16 goog.provide('i18n.input.chrome.inputview.events.DragEvent'); | 16 goog.provide('i18n.input.chrome.inputview.events.DragEvent'); |
| 17 goog.provide('i18n.input.chrome.inputview.events.EventType'); | 17 goog.provide('i18n.input.chrome.inputview.events.EventType'); |
| 18 goog.provide('i18n.input.chrome.inputview.events.LayoutLoadedEvent'); | 18 goog.provide('i18n.input.chrome.inputview.events.LayoutLoadedEvent'); |
| 19 goog.provide('i18n.input.chrome.inputview.events.MessageEvent'); |
| 19 goog.provide('i18n.input.chrome.inputview.events.PointerEvent'); | 20 goog.provide('i18n.input.chrome.inputview.events.PointerEvent'); |
| 20 goog.provide('i18n.input.chrome.inputview.events.SurroundingTextChangedEvent'); | 21 goog.provide('i18n.input.chrome.inputview.events.SurroundingTextChangedEvent'); |
| 21 goog.provide('i18n.input.chrome.inputview.events.SwipeEvent'); | 22 goog.provide('i18n.input.chrome.inputview.events.SwipeEvent'); |
| 22 | 23 |
| 23 goog.require('goog.events'); | 24 goog.require('goog.events'); |
| 24 goog.require('goog.events.Event'); | 25 goog.require('goog.events.Event'); |
| 25 | 26 |
| 26 | 27 |
| 27 goog.scope(function() { | 28 goog.scope(function() { |
| 28 var events = i18n.input.chrome.inputview.events; | 29 var events = i18n.input.chrome.inputview.events; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 48 POINTER_OUT: goog.events.getUniqueId('po'), | 49 POINTER_OUT: goog.events.getUniqueId('po'), |
| 49 REFRESH: goog.events.getUniqueId('rf'), | 50 REFRESH: goog.events.getUniqueId('rf'), |
| 50 SETTINGS_READY: goog.events.getUniqueId('sr'), | 51 SETTINGS_READY: goog.events.getUniqueId('sr'), |
| 51 SURROUNDING_TEXT_CHANGED: goog.events.getUniqueId('stc'), | 52 SURROUNDING_TEXT_CHANGED: goog.events.getUniqueId('stc'), |
| 52 SWIPE: goog.events.getUniqueId('s'), | 53 SWIPE: goog.events.getUniqueId('s'), |
| 53 CONTEXT_UPDATE: goog.events.getUniqueId('cu'), | 54 CONTEXT_UPDATE: goog.events.getUniqueId('cu'), |
| 54 CONTEXT_FOCUS: goog.events.getUniqueId('cf'), | 55 CONTEXT_FOCUS: goog.events.getUniqueId('cf'), |
| 55 CONTEXT_BLUR: goog.events.getUniqueId('cb'), | 56 CONTEXT_BLUR: goog.events.getUniqueId('cb'), |
| 56 VISIBILITY_CHANGE: goog.events.getUniqueId('vc'), | 57 VISIBILITY_CHANGE: goog.events.getUniqueId('vc'), |
| 57 MODEL_UPDATE: goog.events.getUniqueId('mu'), | 58 MODEL_UPDATE: goog.events.getUniqueId('mu'), |
| 58 URL_CHANGED: goog.events.getUniqueId('uc') | 59 URL_CHANGED: goog.events.getUniqueId('uc'), |
| 60 UPDATE_SETTINGS: goog.events.getUniqueId('us'), |
| 61 VOICE_STATE_CHANGE: goog.events.getUniqueId('vsc'), |
| 62 HWT_NETWORK_ERROR: goog.events.getUniqueId('hne'), |
| 63 FRONT_TOGGLE_LANGUAGE_STATE: goog.events.getUniqueId('ftls') |
| 59 }; | 64 }; |
| 60 | 65 |
| 61 | 66 |
| 62 | 67 |
| 63 /** | 68 /** |
| 64 * The event when the data is loaded complete. | 69 * The event when the data is loaded complete. |
| 65 * | 70 * |
| 66 * @param {!Object} data The layout data. | 71 * @param {!Object} data The layout data. |
| 67 * @constructor | 72 * @constructor |
| 68 * @extends {goog.events.Event} | 73 * @extends {goog.events.Event} |
| (...skipping 27 matching lines...) Expand all Loading... |
| 96 * | 101 * |
| 97 * @type {!Object} | 102 * @type {!Object} |
| 98 */ | 103 */ |
| 99 this.data = data; | 104 this.data = data; |
| 100 }; | 105 }; |
| 101 goog.inherits(events.ConfigLoadedEvent, goog.events.Event); | 106 goog.inherits(events.ConfigLoadedEvent, goog.events.Event); |
| 102 | 107 |
| 103 | 108 |
| 104 | 109 |
| 105 /** | 110 /** |
| 111 * The events generated from receiving a message. It dispatched from adapter to |
| 112 * controller or other parts which do not have access to chrome APIs. |
| 113 * |
| 114 * @param {events.EventType} type . |
| 115 * @param {*} msg . |
| 116 * @constructor |
| 117 * @extends {goog.events.Event} |
| 118 */ |
| 119 events.MessageEvent = function(type, msg) { |
| 120 goog.base(this, type); |
| 121 |
| 122 /** @type {*} */ |
| 123 this.msg = msg; |
| 124 }; |
| 125 goog.inherits(events.MessageEvent, goog.events.Event); |
| 126 |
| 127 |
| 128 |
| 129 /** |
| 106 * The pointer event. | 130 * The pointer event. |
| 107 * | 131 * |
| 108 * @param {i18n.input.chrome.inputview.elements.Element} view . | 132 * @param {i18n.input.chrome.inputview.elements.Element} view . |
| 109 * @param {events.EventType} type . | 133 * @param {events.EventType} type . |
| 110 * @param {Node} target The event target. | 134 * @param {Node} target The event target. |
| 111 * @param {number} x . | 135 * @param {number} x . |
| 112 * @param {number} y . | 136 * @param {number} y . |
| 113 * @param {number} identifier . | 137 * @param {number} identifier . |
| 114 * @param {number=} opt_timestamp The timestamp of a pointer event. | 138 * @param {number=} opt_timestamp The timestamp of a pointer event. |
| 115 * @constructor | 139 * @constructor |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 288 |
| 265 /** @type {string} */ | 289 /** @type {string} */ |
| 266 this.compositionText = compositionText; | 290 this.compositionText = compositionText; |
| 267 | 291 |
| 268 /** @type {string} */ | 292 /** @type {string} */ |
| 269 this.committedText = committedText; | 293 this.committedText = committedText; |
| 270 }; | 294 }; |
| 271 goog.inherits(events.ContextUpdateEvent, goog.events.Event); | 295 goog.inherits(events.ContextUpdateEvent, goog.events.Event); |
| 272 | 296 |
| 273 }); // goog.scope | 297 }); // goog.scope |
| OLD | NEW |