Chromium Code Reviews| Index: tools/json_schema_compiler/dart/custom_hooks.dart |
| diff --git a/tools/json_schema_compiler/dart/custom_hooks.dart b/tools/json_schema_compiler/dart/custom_hooks.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a72a5b32abeaa30b8220387d8dff13b795b820f3 |
| --- /dev/null |
| +++ b/tools/json_schema_compiler/dart/custom_hooks.dart |
| @@ -0,0 +1,33 @@ |
| +/** |
| + * This file contains custom hooks for the generated Chrome.* APIs. |
| + * |
| + * The format for a hook is: |
| + * |
| + * // START (full type name) (property/method name) |
| + * (code) |
| + * // END |
| + * |
| + * For getters/setters, add 'get' or 'set' after the property name. |
| + * |
| + * The given code will be substituted instead of the generated one. |
| + * |
| + */ |
| + |
|
not at google - send to devlin
2013/01/25 18:14:33
Whatever happens to these files - could we put eac
sashab
2013/01/29 08:27:13
Done by fixing the way these files are passed in.
|
| + |
| +// START app.window.AppWindow contentWindow |
| +// TODO(sashab, sra): Detect whether this is the current window, or an |
| +// external one, and return an appropriately-typed object |
| +WindowBase get contentWindow => |
| + JS("Window", "#.contentWindow", this._jsObject); |
| +// END |
| + |
| +// START app.runtime.LaunchData items get |
| +List<LaunchItem> get items() { |
| + List<LaunchItem> items_final = new List<LaunchItem>(); |
| + for (var o in JS('List', '#.items', this._jsObject)) { |
| + items_final.add(new LaunchItem._proxy(o)); |
| + } |
| + return items_final; |
| +} |
| +// END |
| + |