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

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

Issue 17031006: Rename DOMWindow interface to Window (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/scripts/make_dom_exceptions.py ('k') | Source/core/scripts/name_macros.py » ('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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 %(factory_implementation)s 50 %(factory_implementation)s
51 return 0; 51 return 0;
52 } 52 }
53 53
54 } // namespace WebCore 54 } // namespace WebCore
55 """ 55 """
56 56
57 57
58 class EventFactoryWriter(name_macros.Writer): 58 class EventFactoryWriter(name_macros.Writer):
59 defaults = { 59 defaults = {
60 'interfaceName' : None, 60 'JSInterfaceName': None,
61 'conditional' : None, 61 'interfaceName': None,
62 'conditional': None,
62 'runtimeConditional': None, 63 'runtimeConditional': None,
63 } 64 }
64 default_parameters = { 65 default_parameters = {
65 'namespace': '', 66 'namespace': '',
66 } 67 }
67 68
68 def __init__(self, in_file_path, enabled_conditions): 69 def __init__(self, in_file_path, enabled_conditions):
69 super(EventFactoryWriter, self).__init__(in_file_path, enabled_condition s) 70 super(EventFactoryWriter, self).__init__(in_file_path, enabled_condition s)
70 self._outputs[(self.class_name + ".cpp")] = self.generate_implementation 71 self._outputs[(self.class_name + ".cpp")] = self.generate_implementation
71 72
(...skipping 17 matching lines...) Expand all
89 def generate_implementation(self): 90 def generate_implementation(self):
90 return IMPLEMENTATION_TEMPLATE % { 91 return IMPLEMENTATION_TEMPLATE % {
91 'class_name': self.class_name, 92 'class_name': self.class_name,
92 'license': license.license_for_generated_cpp(), 93 'license': license.license_for_generated_cpp(),
93 'factory_implementation': "\n".join(map(self._factory_implementation , self._events())), 94 'factory_implementation': "\n".join(map(self._factory_implementation , self._events())),
94 } 95 }
95 96
96 97
97 if __name__ == "__main__": 98 if __name__ == "__main__":
98 name_macros.Maker(EventFactoryWriter).main(sys.argv) 99 name_macros.Maker(EventFactoryWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « Source/core/scripts/make_dom_exceptions.py ('k') | Source/core/scripts/name_macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698