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

Side by Side Diff: sky/engine/build/scripts/make_event_factory.py

Issue 879743004: Remove the EventFactory machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | sky/engine/build/scripts/scripts.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 filters = { 57 filters = {
58 'cpp_name': name_utilities.cpp_name, 58 'cpp_name': name_utilities.cpp_name,
59 'enable_conditional': name_utilities.enable_conditional_if_endif, 59 'enable_conditional': name_utilities.enable_conditional_if_endif,
60 'lower_first': name_utilities.lower_first, 60 'lower_first': name_utilities.lower_first,
61 'case_insensitive_matching': case_insensitive_matching, 61 'case_insensitive_matching': case_insensitive_matching,
62 'script_name': name_utilities.script_name, 62 'script_name': name_utilities.script_name,
63 } 63 }
64 64
65 def __init__(self, in_file_path): 65 def __init__(self, in_file_path):
66 super(EventFactoryWriter, self).__init__(in_file_path) 66 super(EventFactoryWriter, self).__init__(in_file_path)
67 if self.namespace == 'EventTarget':
68 return
69 self._outputs[(self.namespace + self.suffix + ".cpp")] = self.generate_i mplementation
70
71 @template_expander.use_jinja('EventFactory.cpp.tmpl', filters=filters)
72 def generate_implementation(self):
73 return {
74 'namespace': self.namespace,
75 'suffix': self.suffix,
76 'events': self.in_file.name_dictionaries,
77 }
78
79 67
80 if __name__ == "__main__": 68 if __name__ == "__main__":
81 name_macros.Maker(EventFactoryWriter).main(sys.argv) 69 name_macros.Maker(EventFactoryWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | sky/engine/build/scripts/scripts.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698