| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Generate initPartialInterfacesInModules(), which registers partial interfaces
in modules to core interfaces.""" | 6 """Generate initPartialInterfacesInModules(), which registers partial interfaces
in modules to core interfaces.""" |
| 7 | 7 |
| 8 # pylint: disable=relative-import | 8 # pylint: disable=relative-import |
| 9 | 9 |
| 10 from optparse import OptionParser | 10 from optparse import OptionParser |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Use of this source code is governed by a BSD-style license that can be | 23 // Use of this source code is governed by a BSD-style license that can be |
| 24 // found in the LICENSE file. | 24 // found in the LICENSE file. |
| 25 | 25 |
| 26 """ | 26 """ |
| 27 | 27 |
| 28 _INIT_PARTIAL_INTERFACE = """%s | 28 _INIT_PARTIAL_INTERFACE = """%s |
| 29 %s | 29 %s |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 void initPartialInterfacesInModules() | 33 void InitPartialInterfacesInModules() |
| 34 { | 34 { |
| 35 %s | 35 %s |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace blink | 38 } // namespace blink |
| 39 """ | 39 """ |
| 40 | 40 |
| 41 | 41 |
| 42 def parse_options(): | 42 def parse_options(): |
| 43 usage = 'Usage: %prog [options]' | 43 usage = 'Usage: %prog [options]' |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 content = _INIT_PARTIAL_INTERFACE % ( | 99 content = _INIT_PARTIAL_INTERFACE % ( |
| 100 _COPYRIGHT, | 100 _COPYRIGHT, |
| 101 '\n'.join(includes), | 101 '\n'.join(includes), |
| 102 '\n'.join(initialize_calls)) | 102 '\n'.join(initialize_calls)) |
| 103 | 103 |
| 104 write_file(content, options.output) | 104 write_file(content, options.output) |
| 105 | 105 |
| 106 | 106 |
| 107 if __name__ == '__main__': | 107 if __name__ == '__main__': |
| 108 sys.exit(main()) | 108 sys.exit(main()) |
| OLD | NEW |