| OLD | NEW |
| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 # Rather than have the result of an IDBRequest as a union over all possible | 641 # Rather than have the result of an IDBRequest as a union over all possible |
| 642 # results, we mark the result as instantiating any classes, and mark | 642 # results, we mark the result as instantiating any classes, and mark |
| 643 # each operation with the classes that it could cause to be asynchronously | 643 # each operation with the classes that it could cause to be asynchronously |
| 644 # instantiated. | 644 # instantiated. |
| 645 'IDBRequest.result': "@Creates('Null')", | 645 'IDBRequest.result': "@Creates('Null')", |
| 646 | 646 |
| 647 # The source is usually a participant in the operation that generated the | 647 # The source is usually a participant in the operation that generated the |
| 648 # IDBRequest. | 648 # IDBRequest. |
| 649 'IDBRequest.source': "@Creates('Null')", | 649 'IDBRequest.source': "@Creates('Null')", |
| 650 | 650 |
| 651 'IDBFactory.open': "@Creates('IDBDatabase')", | 651 'IDBFactory.open': "@Creates('Database')", |
| 652 | 652 |
| 653 'IDBObjectStore.put': "@_annotation_Creates_IDBKey", | 653 'IDBObjectStore.put': "@_annotation_Creates_IDBKey", |
| 654 'IDBObjectStore.add': "@_annotation_Creates_IDBKey", | 654 'IDBObjectStore.add': "@_annotation_Creates_IDBKey", |
| 655 'IDBObjectStore.get': "@annotation_Creates_SerializedScriptValue", | 655 'IDBObjectStore.get': "@annotation_Creates_SerializedScriptValue", |
| 656 'IDBObjectStore.openCursor': "@Creates('IDBCursor')", | 656 'IDBObjectStore.openCursor': "@Creates('Cursor')", |
| 657 | 657 |
| 658 'IDBIndex.get': "@annotation_Creates_SerializedScriptValue", | 658 'IDBIndex.get': "@annotation_Creates_SerializedScriptValue", |
| 659 'IDBIndex.getKey': | 659 'IDBIndex.getKey': |
| 660 "@annotation_Creates_SerializedScriptValue " | 660 "@annotation_Creates_SerializedScriptValue " |
| 661 # The source is the object store behind the index. | 661 # The source is the object store behind the index. |
| 662 "@Creates('IDBObjectStore')", | 662 "@Creates('ObjectStore')", |
| 663 'IDBIndex.openCursor': "@Creates('IDBCursor')", | 663 'IDBIndex.openCursor': "@Creates('Cursor')", |
| 664 'IDBIndex.openKeyCursor': "@Creates('IDBCursor')", | 664 'IDBIndex.openKeyCursor': "@Creates('Cursor')", |
| 665 | 665 |
| 666 'IDBCursorWithValue.value': | 666 'IDBCursorWithValue.value': |
| 667 '@annotation_Creates_SerializedScriptValue ' | 667 '@annotation_Creates_SerializedScriptValue ' |
| 668 '@annotation_Returns_SerializedScriptValue', | 668 '@annotation_Returns_SerializedScriptValue', |
| 669 | 669 |
| 670 'IDBCursor.key': "@_annotation_Creates_IDBKey @_annotation_Returns_IDBKey", | 670 'IDBCursor.key': "@_annotation_Creates_IDBKey @_annotation_Returns_IDBKey", |
| 671 | 671 |
| 672 '+IDBRequest': "@Returns('IDBRequest') @Creates('IDBRequest')", | 672 '+IDBRequest': "@Returns('Request') @Creates('Request')", |
| 673 | 673 |
| 674 '+IDBOpenDBRequest': "@Returns('IDBRequest') @Creates('IDBRequest')", | 674 '+IDBOpenDBRequest': "@Returns('Request') @Creates('Request')", |
| 675 '+IDBVersionChangeRequest': "@Returns('IDBRequest') @Creates('IDBRequest')", | 675 '+IDBVersionChangeRequest': "@Returns('Request') @Creates('Request')", |
| 676 | 676 |
| 677 | 677 |
| 678 'MessageEvent.ports': "@Creates('=List')", | 678 'MessageEvent.ports': "@Creates('=List')", |
| 679 | 679 |
| 680 'MessageEvent.data': | 680 'MessageEvent.data': |
| 681 "@annotation_Creates_SerializedScriptValue " | 681 "@annotation_Creates_SerializedScriptValue " |
| 682 "@annotation_Returns_SerializedScriptValue", | 682 "@annotation_Returns_SerializedScriptValue", |
| 683 'PopStateEvent.state': | 683 'PopStateEvent.state': |
| 684 "@annotation_Creates_SerializedScriptValue " | 684 "@annotation_Creates_SerializedScriptValue " |
| 685 "@annotation_Returns_SerializedScriptValue", | 685 "@annotation_Returns_SerializedScriptValue", |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 self) | 1245 self) |
| 1246 | 1246 |
| 1247 if type_data.clazz == 'SVGTearOff': | 1247 if type_data.clazz == 'SVGTearOff': |
| 1248 dart_interface_name = self._renamer.RenameInterface( | 1248 dart_interface_name = self._renamer.RenameInterface( |
| 1249 self._database.GetInterface(type_name)) | 1249 self._database.GetInterface(type_name)) |
| 1250 return SVGTearOffIDLTypeInfo( | 1250 return SVGTearOffIDLTypeInfo( |
| 1251 type_name, type_data, dart_interface_name, self) | 1251 type_name, type_data, dart_interface_name, self) |
| 1252 | 1252 |
| 1253 class_name = '%sIDLTypeInfo' % type_data.clazz | 1253 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1254 return globals()[class_name](type_name, type_data) | 1254 return globals()[class_name](type_name, type_data) |
| OLD | NEW |