| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * A set of utilities for use with the Chrome Extension APIs. | 6 * A set of utilities for use with the Chrome Extension APIs. |
| 7 * | 7 * |
| 8 * Allows for easy access to required JS objects. | 8 * Allows for easy access to required JS objects. |
| 9 */ | 9 */ |
| 10 part of chrome; | 10 part of chrome; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 /* | 26 /* |
| 27 * Internal proxy constructor | 27 * Internal proxy constructor |
| 28 * | 28 * |
| 29 * Creates a new Dart object using this existing proxy. | 29 * Creates a new Dart object using this existing proxy. |
| 30 */ | 30 */ |
| 31 ChromeObject._proxy(this._jsObject); | 31 ChromeObject._proxy(this._jsObject); |
| 32 | 32 |
| 33 /* | 33 /* |
| 34 * JS Object Representation | 34 * JS Object Representation |
| 35 */ | 35 */ |
| 36 Object _jsObject; | 36 final Object _jsObject; |
| 37 } | 37 } |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * Useful functions for converting arguments. | 40 * Useful functions for converting arguments. |
| 41 */ | 41 */ |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Converts the given map-type argument to js-friendly format, recursively. | 44 * Converts the given map-type argument to js-friendly format, recursively. |
| 45 * Returns the new Map object. | 45 * Returns the new Map object. |
| 46 */ | 46 */ |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 * => super.removeListener(callback); | 163 * => super.removeListener(callback); |
| 164 * bool hasListener(void callback(LaunchData launchData)) | 164 * bool hasListener(void callback(LaunchData launchData)) |
| 165 * => super.hasListener(callback); | 165 * => super.hasListener(callback); |
| 166 * } | 166 * } |
| 167 * | 167 * |
| 168 */ | 168 */ |
| 169 class Event { | 169 class Event { |
| 170 /* | 170 /* |
| 171 * JS Object Representation | 171 * JS Object Representation |
| 172 */ | 172 */ |
| 173 Object _jsObject; | 173 final Object _jsObject; |
| 174 | 174 |
| 175 /* | 175 /* |
| 176 * Number of arguments the callback takes. | 176 * Number of arguments the callback takes. |
| 177 */ | 177 */ |
| 178 int _callbackArity; | 178 final int _callbackArity; |
| 179 | 179 |
| 180 /* | 180 /* |
| 181 * Private constructor | 181 * Private constructor |
| 182 */ | 182 */ |
| 183 Event._(this._jsObject, this._callbackArity); | 183 Event._(this._jsObject, this._callbackArity); |
| 184 | 184 |
| 185 /* | 185 /* |
| 186 * Methods | 186 * Methods |
| 187 */ | 187 */ |
| 188 | 188 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void callback()]) => | 286 void callback()]) => |
| 287 JS('void', | 287 JS('void', |
| 288 '#.removeRules(#, #, #)', | 288 '#.removeRules(#, #, #)', |
| 289 this._jsObject, | 289 this._jsObject, |
| 290 convertArgument(eventName), | 290 convertArgument(eventName), |
| 291 convertArgument(ruleIdentifiers), | 291 convertArgument(ruleIdentifiers), |
| 292 convertDartClosureToJS(callback, 0) | 292 convertDartClosureToJS(callback, 0) |
| 293 ); | 293 ); |
| 294 } | 294 } |
| 295 | 295 |
| OLD | NEW |