Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: tools/json_schema_compiler/dart/custom_hooks.dart

Issue 12041098: Initial commit of the Dart Chrome Extension APIs generators (Closed) Base URL: http://git.chromium.org/chromium/src.git@file_path_bugfix
Patch Set: Fixed minor style issues; added support for [nodart] IDL flag Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+

Powered by Google App Engine
This is Rietveld 408576698