OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
6 | 6 |
7 # generate_about_tracing puts its files in this directory | 7 # generate_about_tracing puts its files in this directory |
8 tracing_gen_dir = "$root_gen_dir/content/browser/tracing" | 8 tracing_gen_dir = "$root_gen_dir/content/browser/tracing" |
9 | 9 |
10 # The script just writes filename with no dirs to the .grd, so we always need | 10 # The script just writes filename with no dirs to the .grd, so we always need |
11 # this file to be in the same directory as the inputs. | 11 # this file to be in the same directory as the inputs. |
12 tracing_grd = "$tracing_gen_dir/tracing_resources.grd" | 12 tracing_grd = "$tracing_gen_dir/tracing_resources.grd" |
13 | 13 |
14 action("generate_tracing_grd") { | 14 action("generate_tracing_grd") { |
15 visibility = [ ":*" ] | 15 visibility = [ ":*" ] |
16 script = "generate_trace_viewer_grd.py" | 16 script = "generate_trace_viewer_grd.py" |
17 | 17 |
18 input_pages = [ | 18 input_pages = [ |
19 "$tracing_gen_dir/about_tracing.html", | 19 "$tracing_gen_dir/about_tracing.html", |
20 "$tracing_gen_dir/about_tracing.js", | 20 "$tracing_gen_dir/about_tracing.js", |
21 ] | 21 ] |
22 inputs = input_pages | 22 inputs = input_pages |
23 outputs = [ tracing_grd ] | 23 outputs = [ tracing_grd ] |
24 | 24 |
25 args = rebase_path(input_pages, target_gen_dir) + [ | 25 args = rebase_path(input_pages, target_gen_dir) + [ |
26 "--output", rebase_path(tracing_grd, root_build_dir), | 26 "--output", |
27 ] | 27 rebase_path(tracing_grd, root_build_dir), |
| 28 ] |
28 | 29 |
29 deps = [ | 30 deps = [ |
30 "//third_party/trace-viewer:generate_about_tracing", | 31 "//third_party/trace-viewer:generate_about_tracing", |
31 ] | 32 ] |
32 } | 33 } |
33 | 34 |
34 grit("resources") { | 35 grit("resources") { |
35 source = tracing_grd | 36 source = tracing_grd |
36 outputs = [ | 37 outputs = [ |
37 "grit/tracing_resources.h", | 38 "grit/tracing_resources.h", |
38 "tracing_resources.pak", | 39 "tracing_resources.pak", |
39 ] | 40 ] |
40 | 41 |
41 # resource_ids has an entry for our .grd file that looks like: | 42 # resource_ids has an entry for our .grd file that looks like: |
42 # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd" | 43 # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd" |
43 # and what we pass here should make that resolve to our .grd file. | 44 # and what we pass here should make that resolve to our .grd file. |
44 defines = [ | 45 defines = |
45 "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir), | 46 [ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ] |
| 47 |
| 48 deps = [ |
| 49 ":generate_tracing_grd", |
46 ] | 50 ] |
47 | |
48 deps = [ ":generate_tracing_grd" ] | |
49 } | 51 } |
OLD | NEW |