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

Side by Side Diff: Source/bindings/scripts/idl_types.py

Issue 1118673002: Implement ReadableStream as a V8 extra (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanups; make controller a member instead of arg Created 5 years, 7 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
« no previous file with comments | « Source/bindings/core/v8/ScriptState.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 """IDL type handling. 4 """IDL type handling.
5 5
6 Classes: 6 Classes:
7 IdlTypeBase 7 IdlTypeBase
8 IdlType 8 IdlType
9 IdlUnionType 9 IdlUnionType
10 IdlArrayOrSequenceType 10 IdlArrayOrSequenceType
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 # Anything that is not another type is an interface type. 208 # Anything that is not another type is an interface type.
209 # http://www.w3.org/TR/WebIDL/#idl-types 209 # http://www.w3.org/TR/WebIDL/#idl-types
210 # http://www.w3.org/TR/WebIDL/#idl-interface 210 # http://www.w3.org/TR/WebIDL/#idl-interface
211 # In C++ these are RefPtr or PassRefPtr types. 211 # In C++ these are RefPtr or PassRefPtr types.
212 return not(self.is_basic_type or 212 return not(self.is_basic_type or
213 self.is_callback_function or 213 self.is_callback_function or
214 self.is_dictionary or 214 self.is_dictionary or
215 self.is_enum or 215 self.is_enum or
216 self.name == 'Any' or 216 self.name == 'Any' or
217 self.name == 'Object' or 217 self.name == 'Object' or
218 self.name == 'Promise') # Promise will be basic in future 218 self.name == 'Promise' or
219 self.name == 'ReadableStream2') # Promise will be basic in f uture
219 220
220 @property 221 @property
221 def is_string_type(self): 222 def is_string_type(self):
222 return self.name in STRING_TYPES 223 return self.name in STRING_TYPES
223 224
224 @property 225 @property
225 def name(self): 226 def name(self):
226 """Return type name 227 """Return type name
227 228
228 http://heycam.github.io/webidl/#dfn-type-name 229 http://heycam.github.io/webidl/#dfn-type-name
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return self.inner_type.name + 'OrNull' 436 return self.inner_type.name + 'OrNull'
436 437
437 def resolve_typedefs(self, typedefs): 438 def resolve_typedefs(self, typedefs):
438 self.inner_type = self.inner_type.resolve_typedefs(typedefs) 439 self.inner_type = self.inner_type.resolve_typedefs(typedefs)
439 return self 440 return self
440 441
441 def idl_types(self): 442 def idl_types(self):
442 yield self 443 yield self
443 for idl_type in self.inner_type.idl_types(): 444 for idl_type in self.inner_type.idl_types():
444 yield idl_type 445 yield idl_type
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptState.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698