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

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

Issue 10917264: Fix dart:html generated directory structure and unify file names between backends. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 self._system = system 171 self._system = system
172 self._current_secondary_parent = None 172 self._current_secondary_parent = None
173 self._html_interface_name = system._renamer.RenameInterface(self._interface) 173 self._html_interface_name = system._renamer.RenameInterface(self._interface)
174 174
175 def HasImplementation(self): 175 def HasImplementation(self):
176 return not IsPureInterface(self._interface.id) 176 return not IsPureInterface(self._interface.id)
177 177
178 def ImplementationClassName(self): 178 def ImplementationClassName(self):
179 return self._ImplClassName(self._interface.id) 179 return self._ImplClassName(self._interface.id)
180 180
181 def FilePathForDartImplementation(self):
182 return os.path.join(self._system._output_dir, 'dart',
183 '%sImplementation.dart' % self._interface.id)
184
185 def FilePathForDartFactoryProviderImplementation(self):
186 file_name = '%sFactoryProviderImplementation.dart' % self._interface.id
187 return os.path.join(self._system._output_dir, 'dart', file_name)
188
189 def FilePathForDartElementsFactoryProviderImplementation(self):
190 return os.path.join(self._system._output_dir, 'dart',
191 '_ElementsFactoryProviderImplementation.dart')
192
193 def SetImplementationEmitter(self, implementation_emitter): 181 def SetImplementationEmitter(self, implementation_emitter):
194 self._dart_impl_emitter = implementation_emitter 182 self._dart_impl_emitter = implementation_emitter
195 183
196 def ImplementsMergedMembers(self): 184 def ImplementsMergedMembers(self):
197 # We could not add merged functions to implementation class because 185 # We could not add merged functions to implementation class because
198 # underlying c++ object doesn't implement them. Merged functions are 186 # underlying c++ object doesn't implement them. Merged functions are
199 # generated on merged interface implementation instead. 187 # generated on merged interface implementation instead.
200 return False 188 return False
201 189
202 def StartInterface(self): 190 def StartInterface(self):
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 parent_interface = _FindInHierarchy(database, parent_interface, test) 942 parent_interface = _FindInHierarchy(database, parent_interface, test)
955 if parent_interface: 943 if parent_interface:
956 return parent_interface 944 return parent_interface
957 945
958 def _ToWebKitName(name): 946 def _ToWebKitName(name):
959 name = name[0].lower() + name[1:] 947 name = name[0].lower() + name[1:]
960 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(), 948 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(),
961 name) 949 name)
962 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() , 950 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() ,
963 name) 951 name)
OLDNEW
« lib/html/scripts/systemhtml.py ('K') | « lib/html/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698