| 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 blink_devtools_output_dir = "$root_gen_dir/blink/devtools/" | 5 blink_devtools_output_dir = "$root_gen_dir/blink/devtools/" |
| 6 | 6 |
| 7 gypi_values = exec_script( | 7 gypi_values = exec_script( |
| 8 "//build/gypi_to_gn.py", | 8 "//build/gypi_to_gn.py", |
| 9 [ rebase_path("devtools.gypi") ], | 9 [ rebase_path("devtools.gypi") ], |
| 10 "scope", | 10 "scope", |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 outputs = [ "$root_out_dir/resources/inspector/Images/{{source_file_part}}" ] | 74 outputs = [ "$root_out_dir/resources/inspector/Images/{{source_file_part}}" ] |
| 75 } | 75 } |
| 76 | 76 |
| 77 # TODO(GYP) need debug_devtools support (this runs somewhat differently). | 77 # TODO(GYP) need debug_devtools support (this runs somewhat differently). |
| 78 action("generate_devtools_grd") { | 78 action("generate_devtools_grd") { |
| 79 script = "scripts/generate_devtools_grd.py" | 79 script = "scripts/generate_devtools_grd.py" |
| 80 | 80 |
| 81 input_pages = [ | 81 input_pages = [ |
| 82 "$root_out_dir/resources/inspector/devtools.html", | 82 "$root_out_dir/resources/inspector/devtools.html", |
| 83 "$root_out_dir/resources/inspector/inspector.css", | 83 "$root_out_dir/resources/inspector/inspector.css", |
| 84 "$root_out_dir/resources/inspector/audits/_module.js", | 84 "$root_out_dir/resources/inspector/audits.js", |
| 85 "$root_out_dir/resources/inspector/console/_module.js", | 85 "$root_out_dir/resources/inspector/console.js", |
| 86 "$root_out_dir/resources/inspector/devices/_module.js", | 86 "$root_out_dir/resources/inspector/devices.js", |
| 87 "$root_out_dir/resources/inspector/elements/_module.js", | 87 "$root_out_dir/resources/inspector/elements.js", |
| 88 "$root_out_dir/resources/inspector/extensions/_module.js", | 88 "$root_out_dir/resources/inspector/extensions.js", |
| 89 "$root_out_dir/resources/inspector/heap_snapshot_worker/_module.js", | 89 "$root_out_dir/resources/inspector/heap_snapshot_worker.js", |
| 90 "$root_out_dir/resources/inspector/layers/_module.js", | 90 "$root_out_dir/resources/inspector/layers.js", |
| 91 "$root_out_dir/resources/inspector/main/Main.js", | 91 "$root_out_dir/resources/inspector/main/Main.js", |
| 92 "$root_out_dir/resources/inspector/network/_module.js", | 92 "$root_out_dir/resources/inspector/network.js", |
| 93 "$root_out_dir/resources/inspector/profiler/_module.js", | 93 "$root_out_dir/resources/inspector/profiler.js", |
| 94 "$root_out_dir/resources/inspector/resources/_module.js", | 94 "$root_out_dir/resources/inspector/resources.js", |
| 95 "$root_out_dir/resources/inspector/script_formatter_worker/_module.js", | 95 "$root_out_dir/resources/inspector/script_formatter_worker.js", |
| 96 "$root_out_dir/resources/inspector/source_frame/_module.js", | 96 "$root_out_dir/resources/inspector/source_frame.js", |
| 97 "$root_out_dir/resources/inspector/sources/_module.js", | 97 "$root_out_dir/resources/inspector/sources.js", |
| 98 "$root_out_dir/resources/inspector/temp_storage_shared_worker/_module.js", | 98 "$root_out_dir/resources/inspector/temp_storage_shared_worker.js", |
| 99 "$root_out_dir/resources/inspector/timeline/_module.js", | 99 "$root_out_dir/resources/inspector/timeline.js", |
| 100 "$root_out_dir/resources/inspector/devtools_extension_api.js", | 100 "$root_out_dir/resources/inspector/devtools_extension_api.js", |
| 101 ] + gypi_values.devtools_standalone_files + gypi_values.devtools_cm_css_files | 101 ] + gypi_values.devtools_standalone_files + gypi_values.devtools_cm_css_files |
| 102 | 102 |
| 103 images = gypi_values.devtools_image_files | 103 images = gypi_values.devtools_image_files |
| 104 images_path = "front_end/Images" | 104 images_path = "front_end/Images" |
| 105 | 105 |
| 106 inputs = input_pages + images | 106 inputs = input_pages + images |
| 107 | 107 |
| 108 outfile = "$root_gen_dir/devtools/devtools_resources.grd" | 108 outfile = "$root_gen_dir/devtools/devtools_resources.grd" |
| 109 outputs = [ outfile ] | 109 outputs = [ outfile ] |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 script = "scripts/CodeGeneratorFrontend.py" | 172 script = "scripts/CodeGeneratorFrontend.py" |
| 173 | 173 |
| 174 inputs = [ "protocol.json" ] | 174 inputs = [ "protocol.json" ] |
| 175 outputs = [ blink_devtools_output_dir + "InspectorBackendCommands.js" ] | 175 outputs = [ blink_devtools_output_dir + "InspectorBackendCommands.js" ] |
| 176 | 176 |
| 177 args = rebase_path(inputs, root_build_dir) + [ | 177 args = rebase_path(inputs, root_build_dir) + [ |
| 178 "--output_js_dir", rebase_path(blink_devtools_output_dir, root_build_dir), | 178 "--output_js_dir", rebase_path(blink_devtools_output_dir, root_build_dir), |
| 179 ] | 179 ] |
| 180 } | 180 } |
| 181 | 181 |
| 182 # Runs the inline_js_imports script. | 182 # Runs the concatenate_module_scripts script. |
| 183 # module_name: (String) The JS module name to process. | 183 # module_name: (String) The JS module name to process. |
| 184 # imported_files: (List of strings) The list of files the input depends on. | 184 # imported_files: (List of strings) The list of files the input depends on. |
| 185 template("inline_js_imports") { | 185 template("concatenate_module_scripts") { |
| 186 assert(defined(invoker.module_name), target_name) | 186 assert(defined(invoker.module_name), target_name) |
| 187 assert(defined(invoker.imported_files), target_name) | 187 assert(defined(invoker.imported_files), target_name) |
| 188 | 188 |
| 189 action(target_name) { | 189 action(target_name) { |
| 190 script = "scripts/inline_js_imports.py" | 190 script = "scripts/concatenate_module_scripts.py" |
| 191 module_name = invoker.module_name | 191 module_name = invoker.module_name |
| 192 | 192 |
| 193 input = "front_end/" + module_name + "/_module.js" | 193 input = "front_end/" + module_name + "/module.json" |
| 194 inputs = [ input ] + invoker.imported_files | 194 inputs = [ input ] + invoker.imported_files |
| 195 | 195 |
| 196 output = "$root_out_dir/resources/inspector/" + module_name + "/_module.js" | 196 output = "$root_out_dir/resources/inspector/" + module_name + ".js" |
| 197 outputs = [ output ] | 197 outputs = [ output ] |
| 198 | 198 |
| 199 args = [ | 199 args = [ |
| 200 rebase_path(input, root_build_dir), | 200 rebase_path(input, root_build_dir), |
| 201 rebase_path(output, root_build_dir), | 201 rebase_path(output, root_build_dir), |
| 202 ] | 202 ] |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 inline_js_imports("build_audits_module") { | 206 concatenate_module_scripts("build_audits_module") { |
| 207 module_name = "audits" | 207 module_name = "audits" |
| 208 imported_files = gypi_values.devtools_audits_js_files | 208 imported_files = gypi_values.devtools_audits_js_files |
| 209 } | 209 } |
| 210 | 210 |
| 211 inline_js_imports("build_console_module") { | 211 concatenate_module_scripts("build_console_module") { |
| 212 module_name = "console" | 212 module_name = "console" |
| 213 imported_files = gypi_values.devtools_console_js_files | 213 imported_files = gypi_values.devtools_console_js_files |
| 214 } | 214 } |
| 215 | 215 |
| 216 action("build_core_module") { | 216 action("build_core_module") { |
| 217 script = "scripts/concatenate_js_files.py" | 217 script = "scripts/concatenate_js_files.py" |
| 218 input_page = "front_end/inspector.html" | 218 input_page = "front_end/inspector.html" |
| 219 inputs = [ | 219 inputs = [ |
| 220 input_page, | 220 input_page, |
| 221 blink_devtools_output_dir + "Runtime.js", |
| 221 blink_devtools_output_dir + "InspectorBackendCommands.js", | 222 blink_devtools_output_dir + "InspectorBackendCommands.js", |
| 222 blink_devtools_output_dir + "SupportedCSSProperties.js", | 223 blink_devtools_output_dir + "SupportedCSSProperties.js", |
| 223 blink_devtools_output_dir + "common/modules.js", | |
| 224 ] + devtools_core_js_files | 224 ] + devtools_core_js_files |
| 225 | 225 |
| 226 search_path = [ | 226 search_path = [ |
| 227 blink_devtools_output_dir, | 227 blink_devtools_output_dir, |
| 228 "front_end", | 228 "front_end", |
| 229 ] | 229 ] |
| 230 outputs = [ | 230 outputs = [ |
| 231 "$root_out_dir/resources/inspector/main/Main.js", | 231 "$root_out_dir/resources/inspector/main/Main.js", |
| 232 ] | 232 ] |
| 233 | 233 |
| 234 args = [ | 234 args = [ |
| 235 rebase_path(input_page, root_build_dir), | 235 rebase_path(input_page, root_build_dir), |
| 236 ] | 236 ] |
| 237 args += rebase_path(search_path, root_build_dir) | 237 args += rebase_path(search_path, root_build_dir) |
| 238 args += rebase_path(outputs, root_build_dir) | 238 args += rebase_path(outputs, root_build_dir) |
| 239 | 239 |
| 240 deps = [ | 240 deps = [ |
| 241 ":devtools_html", | 241 ":devtools_html", |
| 242 ":supported_css_properties", | 242 ":supported_css_properties", |
| 243 ":frontend_protocol_sources", | 243 ":frontend_protocol_sources", |
| 244 ":concatenated_module_descriptors", | 244 ":concatenated_module_descriptors", |
| 245 ] | 245 ] |
| 246 } | 246 } |
| 247 | 247 |
| 248 inline_js_imports("build_devices_module") { | 248 concatenate_module_scripts("build_devices_module") { |
| 249 module_name = "devices" | 249 module_name = "devices" |
| 250 imported_files = gypi_values.devtools_devices_js_files | 250 imported_files = gypi_values.devtools_devices_js_files |
| 251 } | 251 } |
| 252 | 252 |
| 253 inline_js_imports("build_documentation_module") { | 253 concatenate_module_scripts("build_documentation_module") { |
| 254 module_name = "documentation" | 254 module_name = "documentation" |
| 255 imported_files = gypi_values.devtools_documentation_js_files | 255 imported_files = gypi_values.devtools_documentation_js_files |
| 256 } | 256 } |
| 257 | 257 |
| 258 inline_js_imports("build_elements_module") { | 258 concatenate_module_scripts("build_elements_module") { |
| 259 module_name = "elements" | 259 module_name = "elements" |
| 260 imported_files = gypi_values.devtools_elements_js_files | 260 imported_files = gypi_values.devtools_elements_js_files |
| 261 } | 261 } |
| 262 | 262 |
| 263 inline_js_imports("build_extensions_module") { | 263 concatenate_module_scripts("build_extensions_module") { |
| 264 module_name = "extensions" | 264 module_name = "extensions" |
| 265 imported_files = devtools_extensions_js_files | 265 imported_files = devtools_extensions_js_files |
| 266 } | 266 } |
| 267 | 267 |
| 268 inline_js_imports("build_heap_snapshot_worker_module") { | 268 concatenate_module_scripts("build_heap_snapshot_worker_module") { |
| 269 module_name = "heap_snapshot_worker" | 269 module_name = "heap_snapshot_worker" |
| 270 imported_files = gypi_values.devtools_heap_snapshot_worker_js_files | 270 imported_files = gypi_values.devtools_heap_snapshot_worker_js_files |
| 271 } | 271 } |
| 272 | 272 |
| 273 inline_js_imports("build_layers_module") { | 273 concatenate_module_scripts("build_layers_module") { |
| 274 module_name = "layers" | 274 module_name = "layers" |
| 275 imported_files = gypi_values.devtools_layers_js_files | 275 imported_files = gypi_values.devtools_layers_js_files |
| 276 } | 276 } |
| 277 | 277 |
| 278 inline_js_imports("build_network_module") { | 278 concatenate_module_scripts("build_network_module") { |
| 279 module_name = "network" | 279 module_name = "network" |
| 280 imported_files = gypi_values.devtools_network_js_files | 280 imported_files = gypi_values.devtools_network_js_files |
| 281 } | 281 } |
| 282 | 282 |
| 283 inline_js_imports("build_profiler_module") { | 283 concatenate_module_scripts("build_profiler_module") { |
| 284 module_name = "profiler" | 284 module_name = "profiler" |
| 285 imported_files = gypi_values.devtools_profiler_js_files | 285 imported_files = gypi_values.devtools_profiler_js_files |
| 286 } | 286 } |
| 287 | 287 |
| 288 inline_js_imports("build_resources_module") { | 288 concatenate_module_scripts("build_resources_module") { |
| 289 module_name = "resources" | 289 module_name = "resources" |
| 290 imported_files = gypi_values.devtools_resources_js_files | 290 imported_files = gypi_values.devtools_resources_js_files |
| 291 } | 291 } |
| 292 | 292 |
| 293 inline_js_imports("build_script_formatter_worker_module") { | 293 concatenate_module_scripts("build_script_formatter_worker_module") { |
| 294 module_name = "script_formatter_worker" | 294 module_name = "script_formatter_worker" |
| 295 imported_files = gypi_values.devtools_uglify_files | 295 imported_files = gypi_values.devtools_uglify_files |
| 296 } | 296 } |
| 297 | 297 |
| 298 inline_js_imports("build_settings_module") { | 298 concatenate_module_scripts("build_settings_module") { |
| 299 module_name = "settings" | 299 module_name = "settings" |
| 300 imported_files = gypi_values.devtools_settings_js_files | 300 imported_files = gypi_values.devtools_settings_js_files |
| 301 } | 301 } |
| 302 | 302 |
| 303 inline_js_imports("build_source_frame_module") { | 303 concatenate_module_scripts("build_source_frame_module") { |
| 304 module_name = "source_frame" | 304 module_name = "source_frame" |
| 305 imported_files = gypi_values.devtools_source_frame_js_files + | 305 imported_files = gypi_values.devtools_source_frame_js_files + |
| 306 gypi_values.devtools_cm_js_files | 306 gypi_values.devtools_cm_js_files |
| 307 } | 307 } |
| 308 | 308 |
| 309 inline_js_imports("build_sources_module") { | 309 concatenate_module_scripts("build_sources_module") { |
| 310 module_name = "sources" | 310 module_name = "sources" |
| 311 imported_files = gypi_values.devtools_sources_js_files | 311 imported_files = gypi_values.devtools_sources_js_files |
| 312 } | 312 } |
| 313 | 313 |
| 314 inline_js_imports("build_temp_storage_shared_worker_module") { | 314 concatenate_module_scripts("build_temp_storage_shared_worker_module") { |
| 315 module_name = "temp_storage_shared_worker" | 315 module_name = "temp_storage_shared_worker" |
| 316 imported_files = gypi_values.devtools_temp_storage_shared_worker_js_files | 316 imported_files = gypi_values.devtools_temp_storage_shared_worker_js_files |
| 317 } | 317 } |
| 318 | 318 |
| 319 inline_js_imports("build_timeline_module") { | 319 concatenate_module_scripts("build_timeline_module") { |
| 320 module_name = "timeline" | 320 module_name = "timeline" |
| 321 imported_files = gypi_values.devtools_timeline_js_files | 321 imported_files = gypi_values.devtools_timeline_js_files |
| 322 } | 322 } |
| 323 | 323 |
| 324 action("concatenated_module_descriptors") { | 324 action("concatenated_module_descriptors") { |
| 325 script = "scripts/concatenate_module_descriptors.py" | 325 script = "scripts/concatenate_module_descriptors.py" |
| 326 | 326 |
| 327 input = "front_end/common/modules.js" | 327 input = "front_end/Runtime.js" |
| 328 inputs = [ input ] + gypi_values.devtools_module_json_files | 328 inputs = [ input ] + gypi_values.devtools_module_json_files |
| 329 outputs = [ blink_devtools_output_dir + "common/modules.js" ] | 329 outputs = [ blink_devtools_output_dir + "Runtime.js" ] |
| 330 | 330 |
| 331 args = rebase_path([ input ] + outputs + gypi_values.devtools_module_json_file
s, root_build_dir) | 331 args = rebase_path([ input ] + outputs + gypi_values.devtools_module_json_file
s, root_build_dir) |
| 332 } | 332 } |
| 333 | 333 |
| 334 action("concatenated_devtools_css") { | 334 action("concatenated_devtools_css") { |
| 335 script = "scripts/concatenate_css_files.py" | 335 script = "scripts/concatenate_css_files.py" |
| 336 | 336 |
| 337 input_stylesheet = "front_end/inspector.css" | 337 input_stylesheet = "front_end/inspector.css" |
| 338 inputs = [ input_stylesheet ] + devtools_core_base_files | 338 inputs = [ input_stylesheet ] + devtools_core_base_files |
| 339 | 339 |
| 340 outputs = [ "$root_out_dir/resources/inspector/inspector.css" ] | 340 outputs = [ "$root_out_dir/resources/inspector/inspector.css" ] |
| 341 | 341 |
| 342 args = [ rebase_path(input_stylesheet, root_build_dir) ] + | 342 args = [ rebase_path(input_stylesheet, root_build_dir) ] + |
| 343 rebase_path(outputs, root_build_dir) | 343 rebase_path(outputs, root_build_dir) |
| 344 } | 344 } |
| OLD | NEW |