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

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

Issue 10027017: Auto-generate TimeoutHandler.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 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 | « lib/dom/scripts/generator.py ('k') | lib/dom/src/TimeoutHandler.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 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 self._emitters.FileEmitter(cpp_impl_path), 52 self._emitters.FileEmitter(cpp_impl_path),
53 self._BaseDefines(interface), 53 self._BaseDefines(interface),
54 self._templates) 54 self._templates)
55 55
56 def ProcessCallback(self, interface, info): 56 def ProcessCallback(self, interface, info):
57 self._interface = interface 57 self._interface = interface
58 58
59 dart_interface_path = self._FilePathForDartInterface(self._interface.id) 59 dart_interface_path = self._FilePathForDartInterface(self._interface.id)
60 self._dom_public_files.append(dart_interface_path) 60 self._dom_public_files.append(dart_interface_path)
61 61
62 if IsPureInterface(self._interface.id):
63 return None
64
62 cpp_impl_includes = set() 65 cpp_impl_includes = set()
63 cpp_header_handlers_emitter = emitter.Emitter() 66 cpp_header_handlers_emitter = emitter.Emitter()
64 cpp_impl_handlers_emitter = emitter.Emitter() 67 cpp_impl_handlers_emitter = emitter.Emitter()
65 class_name = 'Dart%s' % self._interface.id 68 class_name = 'Dart%s' % self._interface.id
66 for operation in interface.operations: 69 for operation in interface.operations:
67 if operation.type.id == 'void': 70 if operation.type.id == 'void':
68 return_type = 'void' 71 return_type = 'void'
69 return_prefix = '' 72 return_prefix = ''
70 else: 73 else:
71 return_type = 'bool' 74 return_type = 'bool'
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 def _InstanceOfNode(database, interface): 850 def _InstanceOfNode(database, interface):
848 if interface.id == 'Node': 851 if interface.id == 'Node':
849 return True 852 return True
850 for parent in interface.parents: 853 for parent in interface.parents:
851 if not database.HasInterface(parent.type.id): 854 if not database.HasInterface(parent.type.id):
852 continue 855 continue
853 parent_interface = database.GetInterface(parent.type.id) 856 parent_interface = database.GetInterface(parent.type.id)
854 if _InstanceOfNode(database, parent_interface): 857 if _InstanceOfNode(database, parent_interface):
855 return True 858 return True
856 return False 859 return False
OLDNEW
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/src/TimeoutHandler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698