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

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

Issue 27358002: Generate a class table of all the IDL classes in the database. This table is used (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/dom/scripts/dartdomgenerator.py
===================================================================
--- tools/dom/scripts/dartdomgenerator.py (revision 28728)
+++ tools/dom/scripts/dartdomgenerator.py (working copy)
@@ -137,40 +137,9 @@
dartium_output_dir)
cpp_library_emitter.EmitResolver(
template_loader.Load('cpp_resolver.template'), dartium_output_dir)
+ cpp_library_emitter.EmitClassIdTable(
+ webkit_database, dartium_output_dir, type_registry, renamer)
- path = os.path.join(cpp_output_dir, 'DartWebkitClassIds.h')
- e = emitters.FileEmitter(path)
- e.Emit("""
-// WARNING: Do not edit - generated code.
-// See dart/tools/dom/scripts/dartdomgenerator.py
-
-#ifndef DartWebkitClassIds_h
-#define DartWebkitClassIds_h
-
-namespace WebCore {
-
-enum {
- _HistoryCrossFrameClassId = 0,
- _LocationCrossFrameClassId,
- _DOMWindowCrossFrameClassId,
- _DateTimeClassId,
- // New types that are not auto-generated should be added here.
-""")
- for interface in webkit_database.GetInterfaces():
- interface_name = interface.id
- e.Emit(' %sClassId,\n' % interface_name)
- e.Emit("""
- NumWebkitClassIds
-};
-
-} // namespace WebCore
-
-#endif // DartWebkitClassIds_h
-""")
-
- _logger.info('Flush...')
- emitters.Flush()
-
if update_dom_metadata:
metadata.Flush()

Powered by Google App Engine
This is Rietveld 408576698