| 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 """Generates C++ source files from a mojom.Module.""" | 5 """Generates C++ source files from a mojom.Module.""" |
| 6 | 6 |
| 7 import mojom.generate.generator as generator | 7 import mojom.generate.generator as generator |
| 8 import mojom.generate.module as mojom | 8 import mojom.generate.module as mojom |
| 9 import mojom.generate.pack as pack | 9 import mojom.generate.pack as pack |
| 10 from mojom.generate.template_expander import UseJinja | 10 from mojom.generate.template_expander import UseJinja |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 "cpp_union_getter_return_type": GetUnionGetterReturnType, | 466 "cpp_union_getter_return_type": GetUnionGetterReturnType, |
| 467 "cpp_wrapper_type": GetCppWrapperType, | 467 "cpp_wrapper_type": GetCppWrapperType, |
| 468 "default_value": DefaultValue, | 468 "default_value": DefaultValue, |
| 469 "expression_to_text": ExpressionToText, | 469 "expression_to_text": ExpressionToText, |
| 470 "get_array_validate_params_ctor_args": GetArrayValidateParamsCtorArgs, | 470 "get_array_validate_params_ctor_args": GetArrayValidateParamsCtorArgs, |
| 471 "get_map_validate_params_ctor_args": GetMapValidateParamsCtorArgs, | 471 "get_map_validate_params_ctor_args": GetMapValidateParamsCtorArgs, |
| 472 "get_name_for_kind": GetNameForKind, | 472 "get_name_for_kind": GetNameForKind, |
| 473 "get_pad": pack.GetPad, | 473 "get_pad": pack.GetPad, |
| 474 "get_qualified_name_for_kind": GetQualifiedNameForKind, | 474 "get_qualified_name_for_kind": GetQualifiedNameForKind, |
| 475 "has_callbacks": mojom.HasCallbacks, | 475 "has_callbacks": mojom.HasCallbacks, |
| 476 "has_sync_methods": mojom.HasSyncMethods, |
| 476 "should_inline": ShouldInlineStruct, | 477 "should_inline": ShouldInlineStruct, |
| 477 "should_inline_union": ShouldInlineUnion, | 478 "should_inline_union": ShouldInlineUnion, |
| 478 "is_array_kind": mojom.IsArrayKind, | 479 "is_array_kind": mojom.IsArrayKind, |
| 479 "is_cloneable_kind": mojom.IsCloneableKind, | 480 "is_cloneable_kind": mojom.IsCloneableKind, |
| 480 "is_enum_kind": mojom.IsEnumKind, | 481 "is_enum_kind": mojom.IsEnumKind, |
| 481 "is_integral_kind": mojom.IsIntegralKind, | 482 "is_integral_kind": mojom.IsIntegralKind, |
| 482 "is_move_only_kind": mojom.IsMoveOnlyKind, | 483 "is_move_only_kind": mojom.IsMoveOnlyKind, |
| 483 "is_native_only_kind": IsNativeOnlyKind, | 484 "is_native_only_kind": IsNativeOnlyKind, |
| 484 "is_any_handle_kind": mojom.IsAnyHandleKind, | 485 "is_any_handle_kind": mojom.IsAnyHandleKind, |
| 485 "is_interface_kind": mojom.IsInterfaceKind, | 486 "is_interface_kind": mojom.IsInterfaceKind, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 def GenerateFiles(self, args): | 547 def GenerateFiles(self, args): |
| 547 global _current_typemap | 548 global _current_typemap |
| 548 _current_typemap = self.typemap | 549 _current_typemap = self.typemap |
| 549 suffix = "-%s" % self.variant if self.variant else "" | 550 suffix = "-%s" % self.variant if self.variant else "" |
| 550 self.Write(self.GenerateModuleHeader(), | 551 self.Write(self.GenerateModuleHeader(), |
| 551 self.MatchMojomFilePath("%s%s.h" % (self.module.name, suffix))) | 552 self.MatchMojomFilePath("%s%s.h" % (self.module.name, suffix))) |
| 552 self.Write(self.GenerateModuleInternalHeader(), | 553 self.Write(self.GenerateModuleInternalHeader(), |
| 553 self.MatchMojomFilePath("%s%s-internal.h" % (self.module.name, suffix))) | 554 self.MatchMojomFilePath("%s%s-internal.h" % (self.module.name, suffix))) |
| 554 self.Write(self.GenerateModuleSource(), | 555 self.Write(self.GenerateModuleSource(), |
| 555 self.MatchMojomFilePath("%s%s.cc" % (self.module.name, suffix))) | 556 self.MatchMojomFilePath("%s%s.cc" % (self.module.name, suffix))) |
| OLD | NEW |