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

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

Issue 534133002: [WIP] bindings: Introduce PropertyBag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/bindings/modules/v8/v8.gypi ('k') | Source/bindings/scripts/v8_dictionary.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 self.name == 'Object' or 192 self.name == 'Object' or
193 self.name == 'Promise') # Promise will be basic in future 193 self.name == 'Promise') # Promise will be basic in future
194 194
195 @property 195 @property
196 def is_string_type(self): 196 def is_string_type(self):
197 return self.name in STRING_TYPES 197 return self.name in STRING_TYPES
198 198
199 @property 199 @property
200 def may_raise_exception_on_conversion(self): 200 def may_raise_exception_on_conversion(self):
201 return (self.is_integer_type or 201 return (self.is_integer_type or
202 self.is_dictionary or
202 self.name in ('ByteString', 'ScalarValueString')) 203 self.name in ('ByteString', 'ScalarValueString'))
203 204
204 @property 205 @property
205 def is_union_type(self): 206 def is_union_type(self):
206 return isinstance(self, IdlUnionType) 207 return isinstance(self, IdlUnionType)
207 208
208 @property 209 @property
209 def name(self): 210 def name(self):
210 """Return type name 211 """Return type name
211 212
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 def is_nullable(self): 330 def is_nullable(self):
330 return True 331 return True
331 332
332 @property 333 @property
333 def name(self): 334 def name(self):
334 return self.inner_type.name + 'OrNull' 335 return self.inner_type.name + 'OrNull'
335 336
336 def resolve_typedefs(self, typedefs): 337 def resolve_typedefs(self, typedefs):
337 self.inner_type = self.inner_type.resolve_typedefs(typedefs) 338 self.inner_type = self.inner_type.resolve_typedefs(typedefs)
338 return self 339 return self
OLDNEW
« no previous file with comments | « Source/bindings/modules/v8/v8.gypi ('k') | Source/bindings/scripts/v8_dictionary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698