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 # | 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 29 matching lines...) Expand all Loading... | |
40 class MakeElementFactoryWriter(MakeQualifiedNamesWriter): | 40 class MakeElementFactoryWriter(MakeQualifiedNamesWriter): |
41 defaults = dict(MakeQualifiedNamesWriter.default_parameters, **{ | 41 defaults = dict(MakeQualifiedNamesWriter.default_parameters, **{ |
42 'JSInterfaceName': None, | 42 'JSInterfaceName': None, |
43 'constructorNeedsCreatedByParser': None, | 43 'constructorNeedsCreatedByParser': None, |
44 'constructorNeedsFormElement': None, | 44 'constructorNeedsFormElement': None, |
45 'contextConditional': None, | 45 'contextConditional': None, |
46 'interfaceName': None, | 46 'interfaceName': None, |
47 'noConstructor': None, | 47 'noConstructor': None, |
48 'noTypeHelpers': None, | 48 'noTypeHelpers': None, |
49 'runtimeEnabled': None, | 49 'runtimeEnabled': None, |
50 'Conditional': None, | |
Nils Barth (inactive)
2014/06/13 02:14:24
nit: Capitalization: this should be lowercase, rig
maheshkk
2014/06/13 20:03:16
I think it is capital C. Like below, these attribu
Nils Barth (inactive)
2014/06/16 06:27:52
Thanks for explaining.
Looking at the .in files, u
| |
50 }) | 51 }) |
51 default_parameters = dict(MakeQualifiedNamesWriter.default_parameters, **{ | 52 default_parameters = dict(MakeQualifiedNamesWriter.default_parameters, **{ |
52 'fallbackInterfaceName': '', | 53 'fallbackInterfaceName': '', |
53 'fallbackJSInterfaceName': '', | 54 'fallbackJSInterfaceName': '', |
54 }) | 55 }) |
55 filters = MakeQualifiedNamesWriter.filters | 56 filters = MakeQualifiedNamesWriter.filters |
56 | 57 |
57 def __init__(self, in_file_paths): | 58 def __init__(self, in_file_paths): |
58 super(MakeElementFactoryWriter, self).__init__(in_file_paths) | 59 super(MakeElementFactoryWriter, self).__init__(in_file_paths) |
59 | 60 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 if tag['JSInterfaceName']: | 120 if tag['JSInterfaceName']: |
120 return tag['JSInterfaceName'] | 121 return tag['JSInterfaceName'] |
121 return self._interface(tag) | 122 return self._interface(tag) |
122 | 123 |
123 def _has_js_interface(self, tag): | 124 def _has_js_interface(self, tag): |
124 return not tag['noConstructor'] and self._js_interface(tag) != ('%sEleme nt' % self.namespace) | 125 return not tag['noConstructor'] and self._js_interface(tag) != ('%sEleme nt' % self.namespace) |
125 | 126 |
126 | 127 |
127 if __name__ == "__main__": | 128 if __name__ == "__main__": |
128 in_generator.Maker(MakeElementFactoryWriter).main(sys.argv) | 129 in_generator.Maker(MakeElementFactoryWriter).main(sys.argv) |
OLD | NEW |