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

Side by Side Diff: Source/build/scripts/make_event_factory.py

Issue 57813007: CSS property names and value keywords no longer requires conditions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Julien's review on removing enabled_conditions param Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 default_parameters = { 46 default_parameters = {
47 'namespace': '', 47 'namespace': '',
48 } 48 }
49 filters = { 49 filters = {
50 'script_name': name_utilities.script_name, 50 'script_name': name_utilities.script_name,
51 'cpp_name': name_utilities.cpp_name, 51 'cpp_name': name_utilities.cpp_name,
52 'lower_first': name_utilities.lower_first, 52 'lower_first': name_utilities.lower_first,
53 } 53 }
54 54
55 def __init__(self, in_file_path, enabled_conditions): 55 def __init__(self, in_file_path):
56 super(EventFactoryWriter, self).__init__(in_file_path, enabled_condition s) 56 super(EventFactoryWriter, self).__init__(in_file_path)
57 self._outputs[(self.namespace + ".cpp")] = self.generate_implementation 57 self._outputs[(self.namespace + ".cpp")] = self.generate_implementation
58 58
59 @template_expander.use_jinja('EventFactory.cpp.tmpl', filters=filters) 59 @template_expander.use_jinja('EventFactory.cpp.tmpl', filters=filters)
60 def generate_implementation(self): 60 def generate_implementation(self):
61 return { 61 return {
62 'namespace': self.namespace, 62 'namespace': self.namespace,
63 'events': self.in_file.name_dictionaries, 63 'events': self.in_file.name_dictionaries,
64 } 64 }
65 65
66 66
67 if __name__ == "__main__": 67 if __name__ == "__main__":
68 name_macros.Maker(EventFactoryWriter).main(sys.argv) 68 name_macros.Maker(EventFactoryWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « Source/build/scripts/make_element_factory.py ('k') | Source/build/scripts/make_internal_runtime_flags.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698