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

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

Issue 215293004: Remove one version of DartDOMWrapper::createWrapper and have all call sites (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | « no previous file | 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 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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 'SpecialWrapFor' in ext_attrs or 582 'SpecialWrapFor' in ext_attrs or
583 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'Wrap') or 583 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'Wrap') or
584 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'ToV8') or 584 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'ToV8') or
585 self._interface_type_info.custom_to_dart()): 585 self._interface_type_info.custom_to_dart()):
586 to_dart_emitter.Emit( 586 to_dart_emitter.Emit(
587 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType * value);\n') 587 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType * value);\n')
588 else: 588 else:
589 to_dart_emitter.Emit( 589 to_dart_emitter.Emit(
590 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType * value)\n' 590 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType * value)\n'
591 ' {\n' 591 ' {\n'
592 ' return DartDOMWrapper::createWrapper<Dart$(INTERFACE)>(domDat a, value);\n' 592 ' return DartDOMWrapper::createWrapper<Dart$(INTERFACE)>(domDat a, value, Dart$(INTERFACE)::dartClassId);\n'
593 ' }\n', 593 ' }\n',
594 INTERFACE=self._interface.id) 594 INTERFACE=self._interface.id)
595 595
596 webcore_includes = self._GenerateCPPIncludes( 596 webcore_includes = self._GenerateCPPIncludes(
597 self._interface_type_info.webcore_includes()) 597 self._interface_type_info.webcore_includes())
598 598
599 is_node_test = lambda interface: interface.id == 'Node' 599 is_node_test = lambda interface: interface.id == 'Node'
600 is_active_test = lambda interface: 'ActiveDOMObject' in interface.ext_attrs 600 is_active_test = lambda interface: 'ActiveDOMObject' in interface.ext_attrs
601 is_event_target_test = lambda interface: 'EventTarget' in interface.ext_attr s 601 is_event_target_test = lambda interface: 'EventTarget' in interface.ext_attr s
602 def TypeCheckHelper(test): 602 def TypeCheckHelper(test):
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 e.Emit("};\n"); 1497 e.Emit("};\n");
1498 e.Emit('\n'); 1498 e.Emit('\n');
1499 e.Emit('} // namespace WebCore\n'); 1499 e.Emit('} // namespace WebCore\n');
1500 1500
1501 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): 1501 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument):
1502 return ( 1502 return (
1503 interface.id.endswith('Event') and 1503 interface.id.endswith('Event') and
1504 operation.id.startswith('init') and 1504 operation.id.startswith('init') and
1505 argument.ext_attrs.get('Default') == 'Undefined' and 1505 argument.ext_attrs.get('Default') == 'Undefined' and
1506 argument.type.id == 'DOMString') 1506 argument.type.id == 'DOMString')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698