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

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, 1 month 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 | « tools/dom/scripts/dartmetadata.py ('k') | no next file » | 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 # as a parameter / setter. 529 # as a parameter / setter.
530 'Window get': 530 'Window get':
531 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'), 531 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'),
532 'EventTarget get': 532 'EventTarget get':
533 Conversion('_convertNativeToDart_EventTarget', 'dynamic', 533 Conversion('_convertNativeToDart_EventTarget', 'dynamic',
534 'EventTarget'), 534 'EventTarget'),
535 'EventTarget set': 535 'EventTarget set':
536 Conversion('_convertDartToNative_EventTarget', 'EventTarget', 536 Conversion('_convertDartToNative_EventTarget', 'EventTarget',
537 'dynamic'), 537 'dynamic'),
538 538
539 'WebGLContextAttributes get':
540 Conversion('convertNativeToDart_ContextAttributes', 'dynamic',
541 'ContextAttributes'),
542
539 'ImageData get': 543 'ImageData get':
540 Conversion('convertNativeToDart_ImageData', 'dynamic', 'ImageData'), 544 Conversion('convertNativeToDart_ImageData', 'dynamic', 'ImageData'),
541 'ImageData set': 545 'ImageData set':
542 Conversion('convertDartToNative_ImageData', 'ImageData', 'dynamic'), 546 Conversion('convertDartToNative_ImageData', 'ImageData', 'dynamic'),
543 547
544 'Dictionary get': 548 'Dictionary get':
545 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'), 549 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'),
546 'Dictionary set': 550 'Dictionary set':
547 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'), 551 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'),
548 552
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 if type_data.clazz == 'BasicTypedList': 1255 if type_data.clazz == 'BasicTypedList':
1252 if type_name == 'ArrayBuffer': 1256 if type_name == 'ArrayBuffer':
1253 dart_interface_name = 'ByteBuffer' 1257 dart_interface_name = 'ByteBuffer'
1254 else: 1258 else:
1255 dart_interface_name = self._renamer.RenameInterfaceId(type_name) 1259 dart_interface_name = self._renamer.RenameInterfaceId(type_name)
1256 return BasicTypedListIDLTypeInfo( 1260 return BasicTypedListIDLTypeInfo(
1257 type_name, type_data, dart_interface_name, self) 1261 type_name, type_data, dart_interface_name, self)
1258 1262
1259 class_name = '%sIDLTypeInfo' % type_data.clazz 1263 class_name = '%sIDLTypeInfo' % type_data.clazz
1260 return globals()[class_name](type_name, type_data) 1264 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tools/dom/scripts/dartmetadata.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698