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

Side by Side Diff: mojo/public/tools/bindings/pylib/mojom/generate/module.py

Issue 2715153004: Mojo: Support enums as map keys in WTF (Closed)
Patch Set: Address review comments Created 3 years, 9 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 | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 4
5 # This module's classes provide an interface to mojo modules. Modules are 5 # This module's classes provide an interface to mojo modules. Modules are
6 # collections of interfaces and structs to be used by mojo ipc clients and 6 # collections of interfaces and structs to be used by mojo ipc clients and
7 # servers. 7 # servers.
8 # 8 #
9 # A simple interface would be created this way: 9 # A simple interface would be created this way:
10 # module = mojom.generate.module.Module('Foo') 10 # module = mojom.generate.module.Module('Foo')
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 class Struct(ReferenceKind): 296 class Struct(ReferenceKind):
297 """A struct with typed fields. 297 """A struct with typed fields.
298 298
299 Attributes: 299 Attributes:
300 name: {str} The name of the struct type. 300 name: {str} The name of the struct type.
301 native_only: {bool} Does the struct have a body (i.e. any fields) or is it 301 native_only: {bool} Does the struct have a body (i.e. any fields) or is it
302 purely a native struct. 302 purely a native struct.
303 module: {Module} The defining module. 303 module: {Module} The defining module.
304 imported_from: {dict} Information about where this union was 304 imported_from: {dict} Information about where this union was
305 imported from. 305 imported from.
306 fields: {List[StructField]} The members of the union. 306 fields: {List[StructField]} The members of the struct.
307 attributes: {dict} Additional information about the struct, such as 307 attributes: {dict} Additional information about the struct, such as
308 if it's a native struct. 308 if it's a native struct.
309 """ 309 """
310 310
311 ReferenceKind.AddSharedProperty('name') 311 ReferenceKind.AddSharedProperty('name')
312 ReferenceKind.AddSharedProperty('native_only') 312 ReferenceKind.AddSharedProperty('native_only')
313 ReferenceKind.AddSharedProperty('module') 313 ReferenceKind.AddSharedProperty('module')
314 ReferenceKind.AddSharedProperty('imported_from') 314 ReferenceKind.AddSharedProperty('imported_from')
315 ReferenceKind.AddSharedProperty('fields') 315 ReferenceKind.AddSharedProperty('fields')
316 ReferenceKind.AddSharedProperty('attributes') 316 ReferenceKind.AddSharedProperty('attributes')
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 return True 882 return True
883 elif IsAnyInterfaceKind(kind): 883 elif IsAnyInterfaceKind(kind):
884 return True 884 return True
885 elif IsArrayKind(kind): 885 elif IsArrayKind(kind):
886 return Check(kind.kind) 886 return Check(kind.kind)
887 elif IsMapKind(kind): 887 elif IsMapKind(kind):
888 return Check(kind.key_kind) or Check(kind.value_kind) 888 return Check(kind.key_kind) or Check(kind.value_kind)
889 else: 889 else:
890 return False 890 return False
891 return Check(kind) 891 return Check(kind)
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698