| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 # based on an almost identical script by: jyrki@google.com (Jyrki Alakuijala) | 5 # based on an almost identical script by: jyrki@google.com (Jyrki Alakuijala) |
| 6 | 6 |
| 7 """Prints out include dependencies in chrome. | 7 """Prints out include dependencies in chrome. |
| 8 | 8 |
| 9 Since it ignores defines, it gives just a rough estimation of file size. | 9 Since it ignores defines, it gives just a rough estimation of file size. |
| 10 | 10 |
| 11 Usage: | 11 Usage: |
| 12 tools/include_tracer.py chrome/browser/ui/browser.h | 12 tools/include_tracer.py chrome/browser/ui/browser.h |
| 13 """ | 13 """ |
| 14 | 14 |
| 15 import os | 15 import os |
| 16 import sys | 16 import sys |
| 17 | 17 |
| 18 # Created by copying the command line for prerender_browsertest.cc, replacing | 18 # Created by copying the command line for prerender_browsertest.cc, replacing |
| 19 # spaces with newlines, and dropping everything except -F and -I switches. | 19 # spaces with newlines, and dropping everything except -F and -I switches. |
| 20 # TODO(port): Add windows, linux directories. | 20 # TODO(port): Add windows, linux directories. |
| 21 INCLUDE_PATHS = [ | 21 INCLUDE_PATHS = [ |
| 22 '', | 22 '', |
| 23 'gpu', | 23 'gpu', |
| 24 'skia/config', | 24 'skia/config', |
| 25 'skia/ext', | 25 'skia/ext', |
| 26 'testing/gmock/include', | 26 'testing/gmock/include', |
| 27 'testing/gtest/include', | 27 'testing/gtest/include', |
| 28 'third_party/GTM', | |
| 29 'third_party/WebKit/Source', | 28 'third_party/WebKit/Source', |
| 30 'third_party/WebKit/Source/wtf', | |
| 31 'third_party/WebKit/Source/core', | 29 'third_party/WebKit/Source/core', |
| 32 'third_party/WebKit/Source/core/accessibility', | 30 'third_party/WebKit/Source/core/accessibility', |
| 33 'third_party/WebKit/Source/core/accessibility/chromium', | 31 'third_party/WebKit/Source/core/accessibility/chromium', |
| 34 'third_party/WebKit/Source/core/bindings', | 32 'third_party/WebKit/Source/core/bindings', |
| 35 'third_party/WebKit/Source/core/bindings/generic', | 33 'third_party/WebKit/Source/core/bindings/generic', |
| 36 'third_party/WebKit/Source/core/bindings/v8', | 34 'third_party/WebKit/Source/core/bindings/v8', |
| 37 'third_party/WebKit/Source/core/bindings/v8/custom', | 35 'third_party/WebKit/Source/core/bindings/v8/custom', |
| 38 'third_party/WebKit/Source/core/bindings/v8/specialization', | 36 'third_party/WebKit/Source/core/bindings/v8/specialization', |
| 39 'third_party/WebKit/Source/core/bridge', | 37 'third_party/WebKit/Source/core/bridge', |
| 40 'third_party/WebKit/Source/core/bridge/jni', | 38 'third_party/WebKit/Source/core/bridge/jni', |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 'third_party/WebKit/Source/core/svg/animation', | 104 'third_party/WebKit/Source/core/svg/animation', |
| 107 'third_party/WebKit/Source/core/svg/graphics', | 105 'third_party/WebKit/Source/core/svg/graphics', |
| 108 'third_party/WebKit/Source/core/svg/graphics/filters', | 106 'third_party/WebKit/Source/core/svg/graphics/filters', |
| 109 'third_party/WebKit/Source/core/svg/properties', | 107 'third_party/WebKit/Source/core/svg/properties', |
| 110 'third_party/WebKit/Source/core/webaudio', | 108 'third_party/WebKit/Source/core/webaudio', |
| 111 'third_party/WebKit/Source/core/websockets', | 109 'third_party/WebKit/Source/core/websockets', |
| 112 'third_party/WebKit/Source/core/workers', | 110 'third_party/WebKit/Source/core/workers', |
| 113 'third_party/WebKit/Source/core/xml', | 111 'third_party/WebKit/Source/core/xml', |
| 114 'third_party/WebKit/Source/public', | 112 'third_party/WebKit/Source/public', |
| 115 'third_party/WebKit/Source/web', | 113 'third_party/WebKit/Source/web', |
| 114 'third_party/WebKit/Source/wtf', |
| 116 'third_party/cld', | 115 'third_party/cld', |
| 116 'third_party/google_toolbox_for_mac/src', |
| 117 'third_party/icu/public/common', | 117 'third_party/icu/public/common', |
| 118 'third_party/icu/public/i18n', | 118 'third_party/icu/public/i18n', |
| 119 'third_party/npapi', | 119 'third_party/npapi', |
| 120 'third_party/npapi/bindings', | 120 'third_party/npapi/bindings', |
| 121 'third_party/protobuf', | 121 'third_party/protobuf', |
| 122 'third_party/protobuf/src', | 122 'third_party/protobuf/src', |
| 123 'third_party/skia/gpu/include', | 123 'third_party/skia/gpu/include', |
| 124 'third_party/skia/include/config', | 124 'third_party/skia/include/config', |
| 125 'third_party/skia/include/core', | 125 'third_party/skia/include/core', |
| 126 'third_party/skia/include/effects', | 126 'third_party/skia/include/effects', |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 | 194 |
| 195 def main(): | 195 def main(): |
| 196 bytes = Walk(set(), sys.argv[1], '', 0) | 196 bytes = Walk(set(), sys.argv[1], '', 0) |
| 197 print | 197 print |
| 198 print float(bytes) / (1 << 20), "megabytes of chrome source" | 198 print float(bytes) / (1 << 20), "megabytes of chrome source" |
| 199 | 199 |
| 200 | 200 |
| 201 if __name__ == '__main__': | 201 if __name__ == '__main__': |
| 202 sys.exit(main()) | 202 sys.exit(main()) |
| OLD | NEW |