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

Side by Side Diff: tools/dom/scripts/generator.py

Issue 16336022: Fixing a number of Dart2JS compiler warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/src/dart2js_Conversions.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 json 10 import json
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 'DOMWindow get': 484 'DOMWindow get':
485 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'), 485 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'),
486 'EventTarget get': 486 'EventTarget get':
487 Conversion('_convertNativeToDart_EventTarget', 'dynamic', 487 Conversion('_convertNativeToDart_EventTarget', 'dynamic',
488 'EventTarget'), 488 'EventTarget'),
489 'EventTarget set': 489 'EventTarget set':
490 Conversion('_convertDartToNative_EventTarget', 'EventTarget', 490 Conversion('_convertDartToNative_EventTarget', 'EventTarget',
491 'dynamic'), 491 'dynamic'),
492 492
493 'ImageData get': 493 'ImageData get':
494 Conversion('_convertNativeToDart_ImageData', 'dynamic', 'ImageData'), 494 Conversion('convertNativeToDart_ImageData', 'dynamic', 'ImageData'),
495 'ImageData set': 495 'ImageData set':
496 Conversion('_convertDartToNative_ImageData', 'ImageData', 'dynamic'), 496 Conversion('convertDartToNative_ImageData', 'ImageData', 'dynamic'),
497 497
498 'Dictionary get': 498 'Dictionary get':
499 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'), 499 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'),
500 'Dictionary set': 500 'Dictionary set':
501 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'), 501 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'),
502 502
503 'sequence<DOMString> set': 503 'sequence<DOMString> set':
504 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'), 504 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'),
505 505
506 'any set IDBObjectStore.add': _serialize_SSV, 506 'any set IDBObjectStore.add': _serialize_SSV,
507 'any set IDBObjectStore.put': _serialize_SSV, 507 'any set IDBObjectStore.put': _serialize_SSV,
508 'any set IDBCursor.update': _serialize_SSV, 508 'any set IDBCursor.update': _serialize_SSV,
509 509
510 # postMessage 510 # postMessage
511 'any set MessagePort.postMessage': _serialize_SSV, 511 'any set MessagePort.postMessage': _serialize_SSV,
512 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV, 512 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV,
513 513
514 # receiving message via MessageEvent 514 # receiving message via MessageEvent
515 '* get MessageEvent.data': 515 '* get MessageEvent.data':
516 Conversion('convertNativeToDart_SerializedScriptValue', 516 Conversion('convertNativeToDart_SerializedScriptValue',
517 'dynamic', 'dynamic'), 517 'dynamic', 'dynamic'),
518 518
519 '* get History.state': 519 '* get History.state':
520 Conversion('_convertNativeToDart_SerializedScriptValue', 520 Conversion('convertNativeToDart_SerializedScriptValue',
521 'dynamic', 'dynamic'), 521 'dynamic', 'dynamic'),
522 522
523 '* get PopStateEvent.state': 523 '* get PopStateEvent.state':
524 Conversion('convertNativeToDart_SerializedScriptValue', 524 Conversion('convertNativeToDart_SerializedScriptValue',
525 'dynamic', 'dynamic'), 525 'dynamic', 'dynamic'),
526 526
527 # IDBAny is problematic. Some uses are just a union of other IDB types, 527 # IDBAny is problematic. Some uses are just a union of other IDB types,
528 # which need no conversion.. Others include data values which require 528 # which need no conversion.. Others include data values which require
529 # serialized script value processing. 529 # serialized script value processing.
530 '* get IDBCursorWithValue.value': 530 '* get IDBCursorWithValue.value':
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 type_name, type_data, dart_interface_name, self) 1141 type_name, type_data, dart_interface_name, self)
1142 1142
1143 if type_data.clazz == 'BasicTypedList': 1143 if type_data.clazz == 'BasicTypedList':
1144 dart_interface_name = self._renamer.RenameInterface( 1144 dart_interface_name = self._renamer.RenameInterface(
1145 self._database.GetInterface(type_name)) 1145 self._database.GetInterface(type_name))
1146 return BasicTypedListIDLTypeInfo( 1146 return BasicTypedListIDLTypeInfo(
1147 type_name, type_data, dart_interface_name, self) 1147 type_name, type_data, dart_interface_name, self)
1148 1148
1149 class_name = '%sIDLTypeInfo' % type_data.clazz 1149 class_name = '%sIDLTypeInfo' % type_data.clazz
1150 return globals()[class_name](type_name, type_data) 1150 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/src/dart2js_Conversions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698