| 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 json | 10 import json |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'), | 540 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'), |
| 541 | 541 |
| 542 'any set IDBObjectStore.add': _serialize_SSV, | 542 'any set IDBObjectStore.add': _serialize_SSV, |
| 543 'any set IDBObjectStore.put': _serialize_SSV, | 543 'any set IDBObjectStore.put': _serialize_SSV, |
| 544 'any set IDBCursor.update': _serialize_SSV, | 544 'any set IDBCursor.update': _serialize_SSV, |
| 545 | 545 |
| 546 # postMessage | 546 # postMessage |
| 547 'any set MessagePort.postMessage': _serialize_SSV, | 547 'any set MessagePort.postMessage': _serialize_SSV, |
| 548 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV, | 548 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV, |
| 549 | 549 |
| 550 '* get CustomEvent.detail': |
| 551 Conversion('convertNativeToDart_SerializedScriptValue', |
| 552 'dynamic', 'dynamic'), |
| 553 |
| 550 # receiving message via MessageEvent | 554 # receiving message via MessageEvent |
| 551 '* get MessageEvent.data': | 555 '* get MessageEvent.data': |
| 552 Conversion('convertNativeToDart_SerializedScriptValue', | 556 Conversion('convertNativeToDart_SerializedScriptValue', |
| 553 'dynamic', 'dynamic'), | 557 'dynamic', 'dynamic'), |
| 554 | 558 |
| 555 '* get History.state': | 559 '* get History.state': |
| 556 Conversion('convertNativeToDart_SerializedScriptValue', | 560 Conversion('convertNativeToDart_SerializedScriptValue', |
| 557 'dynamic', 'dynamic'), | 561 'dynamic', 'dynamic'), |
| 558 | 562 |
| 559 '* get PopStateEvent.state': | 563 '* get PopStateEvent.state': |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 type_name, type_data, dart_interface_name, self) | 1183 type_name, type_data, dart_interface_name, self) |
| 1180 | 1184 |
| 1181 if type_data.clazz == 'BasicTypedList': | 1185 if type_data.clazz == 'BasicTypedList': |
| 1182 dart_interface_name = self._renamer.RenameInterface( | 1186 dart_interface_name = self._renamer.RenameInterface( |
| 1183 self._database.GetInterface(type_name)) | 1187 self._database.GetInterface(type_name)) |
| 1184 return BasicTypedListIDLTypeInfo( | 1188 return BasicTypedListIDLTypeInfo( |
| 1185 type_name, type_data, dart_interface_name, self) | 1189 type_name, type_data, dart_interface_name, self) |
| 1186 | 1190 |
| 1187 class_name = '%sIDLTypeInfo' % type_data.clazz | 1191 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1188 return globals()[class_name](type_name, type_data) | 1192 return globals()[class_name](type_name, type_data) |
| OLD | NEW |