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

Side by Side Diff: sdk/lib/html/scripts/htmldartgenerator.py

Issue 11471005: Add documentation for HttpRequest. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 system to generate 6 """This module provides shared functionality for the system to generate
7 dart:html APIs from the IDL database.""" 7 dart:html APIs from the IDL database."""
8 8
9 from generator import AnalyzeOperation, ConstantOutputOrder, \ 9 from generator import AnalyzeOperation, ConstantOutputOrder, \
10 DartDomNameOfAttribute, FindMatchingAttribute, IsDartCollectionType, \ 10 DartDomNameOfAttribute, FindMatchingAttribute, IsDartCollectionType, \
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 '\n' 216 '\n'
217 ' factory $CTOR.fromBuffer(ArrayBuffer buffer, ' 217 ' factory $CTOR.fromBuffer(ArrayBuffer buffer, '
218 '[int byteOffset, int length]) => \n' 218 '[int byteOffset, int length]) => \n'
219 ' $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n' , 219 ' $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n' ,
220 CTOR=self._interface.id, 220 CTOR=self._interface.id,
221 TYPE=self._DartType(typed_array_type), 221 TYPE=self._DartType(typed_array_type),
222 FACTORY=factory_name) 222 FACTORY=factory_name)
223 223
224 def _AddConstructor(self, constructor_info, factory_name, 224 def _AddConstructor(self, constructor_info, factory_name,
225 factory_constructor_name, factory_constructor_params): 225 factory_constructor_name, factory_constructor_params):
226 self._members_emitter.Emit('\n ///@docsEditable true');
226 constructor_info.GenerateFactoryInvocation( 227 constructor_info.GenerateFactoryInvocation(
227 self._DartType, self._members_emitter, factory_name, 228 self._DartType, self._members_emitter, factory_name,
228 factory_constructor_name=factory_constructor_name, 229 factory_constructor_name=factory_constructor_name,
229 factory_parameters=factory_constructor_params) 230 factory_parameters=factory_constructor_params)
230 231
231 def DeclareAttribute(self, attribute, type_name, attr_name, read_only): 232 def DeclareAttribute(self, attribute, type_name, attr_name, read_only):
232 """ Declares an attribute but does not include the code to invoke it. 233 """ Declares an attribute but does not include the code to invoke it.
233 """ 234 """
234 self.EmitAttributeDocumentation(attribute) 235 self.EmitAttributeDocumentation(attribute)
235 if read_only: 236 if read_only:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 walk(interface.parents) 329 walk(interface.parents)
329 else: 330 else:
330 walk(interface.parents[1:]) 331 walk(interface.parents[1:])
331 return result 332 return result
332 333
333 def _DartType(self, type_name): 334 def _DartType(self, type_name):
334 return self._type_registry.DartType(type_name) 335 return self._type_registry.DartType(type_name)
335 336
336 def _IsPrivate(self, name): 337 def _IsPrivate(self, name):
337 return name.startswith('_') 338 return name.startswith('_')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698