| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |