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("//third_party/WebKit/Source/bindings/bindings.gni") | 5 import("//third_party/WebKit/Source/bindings/bindings.gni") |
6 import("//third_party/WebKit/Source/build/scripts/scripts.gni") | 6 import("//third_party/WebKit/Source/build/scripts/scripts.gni") |
7 import("//third_party/WebKit/Source/core/core.gni") | 7 import("//third_party/WebKit/Source/core/core.gni") |
8 import("//third_party/WebKit/Source/modules/modules.gni") | 8 import("//third_party/WebKit/Source/modules/modules.gni") |
9 | 9 |
10 visibility = [ "//third_party/WebKit/*" ] | |
11 | |
12 # Main interface IDL files (excluding dependencies and testing) | |
13 # are included as properties on global objects, and in aggregate bindings. | |
14 main_interface_idl_files = core_idl_files + modules_idl_files | |
15 | |
16 main_interface_idl_files_list = "$target_gen_dir/main_interface_idl_files.tmp" | |
17 write_file(main_interface_idl_files_list, | |
18 rebase_path(main_interface_idl_files, root_build_dir)) | |
19 | |
20 generated_global_constructors_idl_files = [ | |
21 "$blink_output_dir/WindowConstructors.idl", | |
22 "$blink_output_dir/SharedWorkerGlobalScopeConstructors.idl", | |
23 "$blink_output_dir/DedicatedWorkerGlobalScopeConstructors.idl", | |
24 "$blink_output_dir/ServiceWorkerGlobalScopeConstructors.idl", | |
25 ] | |
26 generated_global_constructors_header_files = [ | |
27 "$blink_output_dir/WindowConstructors.h", | |
28 "$blink_output_dir/SharedWorkerGlobalScopeConstructors.h", | |
29 "$blink_output_dir/DedicatedWorkerGlobalScopeConstructors.h", | |
30 "$blink_output_dir/ServiceWorkerGlobalScopeConstructors.h", | |
31 ] | |
32 | |
33 # FIXME: Generate separate core_global_objects | |
34 # http://crbug.com/358074 | |
35 # GYP version: generated.gyp:global_objects | |
36 action("global_objects") { | |
37 script = "scripts/compute_global_objects.py" | |
38 | |
39 inputs = [ | |
40 "scripts/utilities.py", | |
41 # Only look in main IDL files (exclude dependencies and testing, | |
42 # which should not define global objects). | |
43 main_interface_idl_files_list, | |
44 ] + main_interface_idl_files | |
45 | |
46 outputs = [ | |
47 "$bindings_output_dir/GlobalObjects.pickle", | |
48 ] | |
49 | |
50 args = [ | |
51 "--idl-files-list", | |
52 rebase_path(main_interface_idl_files_list, root_build_dir), | |
53 "--write-file-only-if-changed=1", # Always true for Ninja. FIXME: remove | |
54 # when everything switched to GN. | |
55 "--", | |
56 rebase_path("$bindings_output_dir/GlobalObjects.pickle", root_build_dir), | |
57 ] | |
58 } | |
59 | |
60 # GYP version: generated.gyp:global_constructors_idls | |
61 action("global_constructors_idls") { | |
62 script = "scripts/generate_global_constructors.py" | |
63 | |
64 inputs = [ | |
65 "scripts/generate_global_constructors.py", | |
66 "scripts/utilities.py", | |
67 "$bindings_output_dir/GlobalObjects.pickle", | |
68 # Only includes main IDL files (exclude dependencies and testing, | |
69 # which should not appear on global objects). | |
70 main_interface_idl_files_list, | |
71 ] + main_interface_idl_files | |
72 | |
73 outputs = generated_global_constructors_idl_files + | |
74 generated_global_constructors_header_files | |
75 | |
76 args = [ | |
77 "--idl-files-list", | |
78 rebase_path(main_interface_idl_files_list, root_build_dir), | |
79 "--global-objects-file", | |
80 rebase_path("$bindings_output_dir/GlobalObjects.pickle", root_build_dir), | |
81 "--write-file-only-if-changed=1", # Always true for Ninja. | |
82 "--", | |
83 "Window", | |
84 rebase_path("$blink_output_dir/WindowConstructors.idl", root_build_dir), | |
85 "SharedWorkerGlobalScope", | |
86 rebase_path("$blink_output_dir/SharedWorkerGlobalScopeConstructors.idl", | |
87 root_build_dir), | |
88 "DedicatedWorkerGlobalScope", | |
89 rebase_path("$blink_output_dir/DedicatedWorkerGlobalScopeConstructors.idl", | |
90 root_build_dir), | |
91 "ServiceWorkerGlobalScope", | |
92 rebase_path("$blink_output_dir/ServiceWorkerGlobalScopeConstructors.idl", | |
93 root_build_dir), | |
94 ] | |
95 | |
96 deps = [ ":global_objects" ] | |
97 } | |
98 | |
99 # GYP version: generated.gyp:generated_idls | |
100 group("generated_idls") { | |
101 deps = [ | |
102 ":global_constructors_idls", | |
103 "//third_party/WebKit/Source/core:generated_testing_idls", | |
104 ] | |
105 } | |
OLD | NEW |