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

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

Issue 35863006: Fix for getContextAttributes which wraps bare dictionary into a Dart type. (Closed) Base URL: https://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 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 json 10 import json
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 # as a parameter / setter. 527 # as a parameter / setter.
528 'Window get': 528 'Window get':
529 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'), 529 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'),
530 'EventTarget get': 530 'EventTarget get':
531 Conversion('_convertNativeToDart_EventTarget', 'dynamic', 531 Conversion('_convertNativeToDart_EventTarget', 'dynamic',
532 'EventTarget'), 532 'EventTarget'),
533 'EventTarget set': 533 'EventTarget set':
534 Conversion('_convertDartToNative_EventTarget', 'EventTarget', 534 Conversion('_convertDartToNative_EventTarget', 'EventTarget',
535 'dynamic'), 535 'dynamic'),
536 536
537 'WebGLContextAttributes get':
538 Conversion('convertNativeToDart_ContextAttributes', 'dynamic',
539 'ContextAttributes'),
540
537 'ImageData get': 541 'ImageData get':
538 Conversion('convertNativeToDart_ImageData', 'dynamic', 'ImageData'), 542 Conversion('convertNativeToDart_ImageData', 'dynamic', 'ImageData'),
539 'ImageData set': 543 'ImageData set':
540 Conversion('convertDartToNative_ImageData', 'ImageData', 'dynamic'), 544 Conversion('convertDartToNative_ImageData', 'ImageData', 'dynamic'),
541 545
542 'Dictionary get': 546 'Dictionary get':
543 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'), 547 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'),
544 'Dictionary set': 548 'Dictionary set':
545 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'), 549 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'),
546 550
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 if type_data.clazz == 'BasicTypedList': 1253 if type_data.clazz == 'BasicTypedList':
1250 if type_name == 'ArrayBuffer': 1254 if type_name == 'ArrayBuffer':
1251 dart_interface_name = 'ByteBuffer' 1255 dart_interface_name = 'ByteBuffer'
1252 else: 1256 else:
1253 dart_interface_name = self._renamer.RenameInterfaceId(type_name) 1257 dart_interface_name = self._renamer.RenameInterfaceId(type_name)
1254 return BasicTypedListIDLTypeInfo( 1258 return BasicTypedListIDLTypeInfo(
1255 type_name, type_data, dart_interface_name, self) 1259 type_name, type_data, dart_interface_name, self)
1256 1260
1257 class_name = '%sIDLTypeInfo' % type_data.clazz 1261 class_name = '%sIDLTypeInfo' % type_data.clazz
1258 return globals()[class_name](type_name, type_data) 1262 return globals()[class_name](type_name, type_data)
OLDNEW
« tests/html/webgl_1_test.dart ('K') | « tools/dom/scripts/dartmetadata.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698