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

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

Issue 1023363002: Make dartj2s do type conversions on constructor arguments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Line length Created 5 years, 9 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 the systems to generate 6 """This module provides shared functionality for the systems to generate
7 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 386
387 def ImplementsMergedMembers(self): 387 def ImplementsMergedMembers(self):
388 # We could not add merged functions to implementation class because 388 # We could not add merged functions to implementation class because
389 # underlying c++ object doesn't implement them. Merged functions are 389 # underlying c++ object doesn't implement them. Merged functions are
390 # generated on merged interface implementation instead. 390 # generated on merged interface implementation instead.
391 return False 391 return False
392 392
393 def CustomJSMembers(self): 393 def CustomJSMembers(self):
394 return {} 394 return {}
395 395
396 def _InputConversion(self, type_name, info):
397 return None
398
396 def GenerateCallback(self, info): 399 def GenerateCallback(self, info):
397 if IsPureInterface(self._interface.id) or IsCustomType(self._interface.id): 400 if IsPureInterface(self._interface.id) or IsCustomType(self._interface.id):
398 return 401 return
399 402
400 interface = self._interface 403 interface = self._interface
401 if interface.parents: 404 if interface.parents:
402 supertype = '%sClassId' % interface.parents[0].type.id 405 supertype = '%sClassId' % interface.parents[0].type.id
403 else: 406 else:
404 supertype = '-1' 407 supertype = '-1'
405 408
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 1918
1916 def _IsCustom(op_or_attr): 1919 def _IsCustom(op_or_attr):
1917 assert(isinstance(op_or_attr, IDLMember)) 1920 assert(isinstance(op_or_attr, IDLMember))
1918 return 'Custom' in op_or_attr.ext_attrs or 'DartCustom' in op_or_attr.ext_attr s 1921 return 'Custom' in op_or_attr.ext_attrs or 'DartCustom' in op_or_attr.ext_attr s
1919 1922
1920 def _IsCustomValue(op_or_attr, value): 1923 def _IsCustomValue(op_or_attr, value):
1921 if _IsCustom(op_or_attr): 1924 if _IsCustom(op_or_attr):
1922 return op_or_attr.ext_attrs.get('Custom') == value \ 1925 return op_or_attr.ext_attrs.get('Custom') == value \
1923 or op_or_attr.ext_attrs.get('DartCustom') == value 1926 or op_or_attr.ext_attrs.get('DartCustom') == value
1924 return False 1927 return False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698