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

Side by Side Diff: sdk/lib/html/scripts/generator.py

Issue 11419300: Dartifying dart:html type names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import re 10 import re
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 # Rather than have the result of an IDBRequest as a union over all possible 624 # Rather than have the result of an IDBRequest as a union over all possible
625 # results, we mark the result as instantiating any classes, and mark 625 # results, we mark the result as instantiating any classes, and mark
626 # each operation with the classes that it could cause to be asynchronously 626 # each operation with the classes that it could cause to be asynchronously
627 # instantiated. 627 # instantiated.
628 'IDBRequest.result': "@Creates('Null')", 628 'IDBRequest.result': "@Creates('Null')",
629 629
630 # The source is usually a participant in the operation that generated the 630 # The source is usually a participant in the operation that generated the
631 # IDBRequest. 631 # IDBRequest.
632 'IDBRequest.source': "@Creates('Null')", 632 'IDBRequest.source': "@Creates('Null')",
633 633
634 'IDBFactory.open': "@Creates('IDBDatabase')", 634 'IDBFactory.open': "@Creates('Database')",
635 635
636 'IDBObjectStore.put': "@_annotation_Creates_IDBKey", 636 'IDBObjectStore.put': "@_annotation_Creates_IDBKey",
637 'IDBObjectStore.add': "@_annotation_Creates_IDBKey", 637 'IDBObjectStore.add': "@_annotation_Creates_IDBKey",
638 'IDBObjectStore.get': "@annotation_Creates_SerializedScriptValue", 638 'IDBObjectStore.get': "@annotation_Creates_SerializedScriptValue",
639 'IDBObjectStore.openCursor': "@Creates('IDBCursor')", 639 'IDBObjectStore.openCursor': "@Creates('Cursor')",
640 640
641 'IDBIndex.get': "@annotation_Creates_SerializedScriptValue", 641 'IDBIndex.get': "@annotation_Creates_SerializedScriptValue",
642 'IDBIndex.getKey': 642 'IDBIndex.getKey':
643 "@annotation_Creates_SerializedScriptValue " 643 "@annotation_Creates_SerializedScriptValue "
644 # The source is the object store behind the index. 644 # The source is the object store behind the index.
645 "@Creates('IDBObjectStore')", 645 "@Creates('ObjectStore')",
646 'IDBIndex.openCursor': "@Creates('IDBCursor')", 646 'IDBIndex.openCursor': "@Creates('Cursor')",
647 'IDBIndex.openKeyCursor': "@Creates('IDBCursor')", 647 'IDBIndex.openKeyCursor': "@Creates('Cursor')",
648 648
649 'IDBCursorWithValue.value': 649 'IDBCursorWithValue.value':
650 '@annotation_Creates_SerializedScriptValue ' 650 '@annotation_Creates_SerializedScriptValue '
651 '@annotation_Returns_SerializedScriptValue', 651 '@annotation_Returns_SerializedScriptValue',
652 652
653 'IDBCursor.key': "@_annotation_Creates_IDBKey @_annotation_Returns_IDBKey", 653 'IDBCursor.key': "@_annotation_Creates_IDBKey @_annotation_Returns_IDBKey",
654 654
655 '+IDBRequest': "@Returns('IDBRequest') @Creates('IDBRequest')", 655 '+IDBRequest': "@Returns('Request') @Creates('Request')",
656 656
657 '+IDBOpenDBRequest': "@Returns('IDBRequest') @Creates('IDBRequest')", 657 '+IDBOpenDBRequest': "@Returns('Request') @Creates('Request')",
658 '+IDBVersionChangeRequest': "@Returns('IDBRequest') @Creates('IDBRequest')", 658 '+IDBVersionChangeRequest': "@Returns('Request') @Creates('Request')",
659 659
660 660
661 'MessageEvent.ports': "@Creates('=List')", 661 'MessageEvent.ports': "@Creates('=List')",
662 662
663 'MessageEvent.data': 663 'MessageEvent.data':
664 "@annotation_Creates_SerializedScriptValue " 664 "@annotation_Creates_SerializedScriptValue "
665 "@annotation_Returns_SerializedScriptValue", 665 "@annotation_Returns_SerializedScriptValue",
666 'PopStateEvent.state': 666 'PopStateEvent.state':
667 "@annotation_Creates_SerializedScriptValue " 667 "@annotation_Creates_SerializedScriptValue "
668 "@annotation_Returns_SerializedScriptValue", 668 "@annotation_Returns_SerializedScriptValue",
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 self) 1225 self)
1226 1226
1227 if type_data.clazz == 'SVGTearOff': 1227 if type_data.clazz == 'SVGTearOff':
1228 dart_interface_name = self._renamer.RenameInterface( 1228 dart_interface_name = self._renamer.RenameInterface(
1229 self._database.GetInterface(type_name)) 1229 self._database.GetInterface(type_name))
1230 return SVGTearOffIDLTypeInfo( 1230 return SVGTearOffIDLTypeInfo(
1231 type_name, type_data, dart_interface_name, self) 1231 type_name, type_data, dart_interface_name, self)
1232 1232
1233 class_name = '%sIDLTypeInfo' % type_data.clazz 1233 class_name = '%sIDLTypeInfo' % type_data.clazz
1234 return globals()[class_name](type_name, type_data) 1234 return globals()[class_name](type_name, type_data)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698