OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (C) 2013 Google Inc. All rights reserved. | 2 # Copyright (C) 2013 Google Inc. All rights reserved. |
3 # Copyright (C) 2013 Igalia S.L. All rights reserved. | 3 # Copyright (C) 2013 Igalia S.L. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 'initial': None, | 60 'initial': None, |
61 'setNeedsStyleRecalcInAllFrames': 0, | 61 'setNeedsStyleRecalcInAllFrames': 0, |
62 } | 62 } |
63 default_parameters = {} | 63 default_parameters = {} |
64 filters = { | 64 filters = { |
65 'upper_first': name_utilities.upper_first, | 65 'upper_first': name_utilities.upper_first, |
66 'to_passing_type': to_passing_type, | 66 'to_passing_type': to_passing_type, |
67 'to_idl_type': to_idl_type, | 67 'to_idl_type': to_idl_type, |
68 } | 68 } |
69 | 69 |
70 def __init__(self, in_file_path, enabled_conditions): | 70 def __init__(self, in_file_path): |
71 super(MakeSettingsWriter, self).__init__(in_file_path, enabled_condition
s) | 71 super(MakeSettingsWriter, self).__init__(in_file_path) |
72 | 72 |
73 self.in_file.name_dictionaries.sort(key=lambda entry: entry['name']) | 73 self.in_file.name_dictionaries.sort(key=lambda entry: entry['name']) |
74 | 74 |
75 self._outputs = { | 75 self._outputs = { |
76 ('InternalSettingsGenerated.h'): self.generate_header, | 76 ('InternalSettingsGenerated.h'): self.generate_header, |
77 ('InternalSettingsGenerated.cpp'): self.generate_implementation, | 77 ('InternalSettingsGenerated.cpp'): self.generate_implementation, |
78 ('InternalSettingsGenerated.idl'): self.generate_idl, | 78 ('InternalSettingsGenerated.idl'): self.generate_idl, |
79 ('SettingsMacros.h'): self.generate_macros, | 79 ('SettingsMacros.h'): self.generate_macros, |
80 } | 80 } |
81 self._template_context = { | 81 self._template_context = { |
(...skipping 12 matching lines...) Expand all Loading... |
94 def generate_idl(self): | 94 def generate_idl(self): |
95 return self._template_context | 95 return self._template_context |
96 | 96 |
97 @template_expander.use_jinja('SettingsMacros.h.tmpl', filters=filters) | 97 @template_expander.use_jinja('SettingsMacros.h.tmpl', filters=filters) |
98 def generate_macros(self): | 98 def generate_macros(self): |
99 return self._template_context | 99 return self._template_context |
100 | 100 |
101 | 101 |
102 if __name__ == '__main__': | 102 if __name__ == '__main__': |
103 in_generator.Maker(MakeSettingsWriter).main(sys.argv) | 103 in_generator.Maker(MakeSettingsWriter).main(sys.argv) |
OLD | NEW |