OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 Google Inc. All rights reserved. | 2 # Copyright (c) 2011 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 "ApplicationCache", | 52 "ApplicationCache", |
53 "CacheStorage", | 53 "CacheStorage", |
54 "CSS", | 54 "CSS", |
55 "Debugger", | 55 "Debugger", |
56 "DOM", | 56 "DOM", |
57 "DOMDebugger", | 57 "DOMDebugger", |
58 "IndexedDB", | 58 "IndexedDB", |
59 "LayerTree", | 59 "LayerTree", |
60 "Network", | 60 "Network", |
61 "Page", | 61 "Page", |
62 "Runtime", | |
63 ]) | 62 ]) |
64 | 63 |
65 | 64 |
66 def full_qualified_type_id(domain_name, type_id): | 65 def full_qualified_type_id(domain_name, type_id): |
67 if type_id.find(".") == -1: | 66 if type_id.find(".") == -1: |
68 return "%s.%s" % (domain_name, type_id) | 67 return "%s.%s" % (domain_name, type_id) |
69 return type_id | 68 return type_id |
70 | 69 |
71 | 70 |
72 def fix_camel_case(name): | 71 def fix_camel_case(name): |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 import sys | 282 import sys |
284 import os.path | 283 import os.path |
285 program_name = os.path.basename(__file__) | 284 program_name = os.path.basename(__file__) |
286 if len(sys.argv) < 5 or sys.argv[1] != "-o": | 285 if len(sys.argv) < 5 or sys.argv[1] != "-o": |
287 sys.stderr.write("Usage: %s -o OUTPUT_FILE INPUT_FILE_1 INPUT_FILE_2\n"
% program_name) | 286 sys.stderr.write("Usage: %s -o OUTPUT_FILE INPUT_FILE_1 INPUT_FILE_2\n"
% program_name) |
288 exit(1) | 287 exit(1) |
289 output_path = sys.argv[2] | 288 output_path = sys.argv[2] |
290 input_path_1 = sys.argv[3] | 289 input_path_1 = sys.argv[3] |
291 input_path_2 = sys.argv[4] | 290 input_path_2 = sys.argv[4] |
292 generate_protocol_externs(output_path, input_path_1, input_path_2) | 291 generate_protocol_externs(output_path, input_path_1, input_path_2) |
OLD | NEW |