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

Unified Diff: tools/dom/scripts/dartdomgenerator.py

Issue 23819035: Give generatored bindings classes a field remembering an index into a cache of handles on the corre… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/dartium/cpp_header.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/dartdomgenerator.py
diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py
index 2ba67aae96c2ad0d01f020326e7a7bec9358f9d5..97fe12d2eb8618fd1a7d396440671395f38111d9 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -138,6 +138,34 @@ def GenerateFromDatabase(common_database, dart2js_output_dir,
cpp_library_emitter.EmitResolver(
template_loader.Load('cpp_resolver.template'), dartium_output_dir)
+ path = os.path.join(cpp_output_dir, 'DartClassIds.h')
siva 2013/09/12 18:18:20 Can we call this file DartWebkitClassIds.h instead
+ e = emitters.FileEmitter(path)
+ e.Emit("""
+// WARNING: Do not edit - generated code.
+
+#ifndef DartClassIds_h
+#define DartClassIds_h
siva 2013/09/12 18:18:20 DartWebkitClassIds_h
+
+namespace WebCore {
+
+enum {
+ _HistoryCrossFrameClassId = 0,
+ _LocationCrossFrameClassId,
+ _DOMWindowCrossFrameClassId,
+ _NPObjectClassId,
siva 2013/09/12 18:18:20 We should add a comment here that whenever new typ
+""")
+ for interface in webkit_database.GetInterfaces():
+ interface_name = interface.id
+ e.Emit(' %sClassId,\n' % interface_name)
+ e.Emit("""
+ NumClassIds
siva 2013/09/12 18:18:20 kNumWebKitClassIds maybe for this maybe.
+};
+
+} // namespace WebCore
+
+#endif // DartClassIds_h
siva 2013/09/12 18:18:20 Ditto comment
+""")
+
_logger.info('Flush...')
emitters.Flush()
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/dartium/cpp_header.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698