| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/jumbo.gni") |
| import("//third_party/blink/renderer/bindings/bindings.gni") |
| import("//third_party/blink/renderer/core/core.gni") |
| import("//third_party/inspector_protocol/inspector_protocol.gni") |
| import("//v8/gni/v8.gni") |
| |
| _inspector_protocol_dir = "//third_party/inspector_protocol" |
| |
| blink_core_sources("inspector") { |
| sources = [ |
| "add_string_to_digestor.cc", |
| "add_string_to_digestor.h", |
| "console_message.cc", |
| "console_message.h", |
| "console_message_storage.cc", |
| "console_message_storage.h", |
| "console_types.h", |
| "dev_tools_emulator.cc", |
| "dev_tools_emulator.h", |
| "dev_tools_host.cc", |
| "dev_tools_host.h", |
| "devtools_agent.cc", |
| "devtools_agent.h", |
| "devtools_session.cc", |
| "devtools_session.h", |
| "dom_editor.cc", |
| "dom_editor.h", |
| "dom_patch_support.cc", |
| "dom_patch_support.h", |
| "identifiers_factory.cc", |
| "identifiers_factory.h", |
| "inspected_frames.cc", |
| "inspected_frames.h", |
| "inspector_animation_agent.cc", |
| "inspector_animation_agent.h", |
| "inspector_application_cache_agent.cc", |
| "inspector_application_cache_agent.h", |
| "inspector_audits_agent.cc", |
| "inspector_audits_agent.h", |
| "inspector_base_agent.h", |
| "inspector_css_agent.cc", |
| "inspector_css_agent.h", |
| "inspector_dom_agent.cc", |
| "inspector_dom_agent.h", |
| "inspector_dom_debugger_agent.cc", |
| "inspector_dom_debugger_agent.h", |
| "inspector_dom_snapshot_agent.cc", |
| "inspector_dom_snapshot_agent.h", |
| "inspector_emulation_agent.cc", |
| "inspector_emulation_agent.h", |
| "inspector_frontend_client.h", |
| "inspector_highlight.cc", |
| "inspector_highlight.h", |
| "inspector_history.cc", |
| "inspector_history.h", |
| "inspector_io_agent.cc", |
| "inspector_io_agent.h", |
| "inspector_layer_tree_agent.cc", |
| "inspector_layer_tree_agent.h", |
| "inspector_log_agent.cc", |
| "inspector_log_agent.h", |
| "inspector_memory_agent.cc", |
| "inspector_memory_agent.h", |
| "inspector_network_agent.cc", |
| "inspector_network_agent.h", |
| "inspector_overlay_agent.cc", |
| "inspector_overlay_agent.h", |
| "inspector_overlay_host.cc", |
| "inspector_overlay_host.h", |
| "inspector_page_agent.cc", |
| "inspector_page_agent.h", |
| "inspector_performance_agent.cc", |
| "inspector_performance_agent.h", |
| "inspector_resource_container.cc", |
| "inspector_resource_container.h", |
| "inspector_resource_content_loader.cc", |
| "inspector_resource_content_loader.h", |
| "inspector_session_state.cc", |
| "inspector_session_state.h", |
| "inspector_style_sheet.cc", |
| "inspector_style_sheet.h", |
| "inspector_task_runner.cc", |
| "inspector_task_runner.h", |
| "inspector_testing_agent.cc", |
| "inspector_testing_agent.h", |
| "inspector_trace_events.cc", |
| "inspector_trace_events.h", |
| "main_thread_debugger.cc", |
| "main_thread_debugger.h", |
| "network_resources_data.cc", |
| "network_resources_data.h", |
| "resolve_node.cc", |
| "resolve_node.h", |
| "thread_debugger.cc", |
| "thread_debugger.h", |
| "v8_inspector_string.cc", |
| "v8_inspector_string.h", |
| "worker_devtools_params.h", |
| "worker_inspector_controller.cc", |
| "worker_inspector_controller.h", |
| "worker_thread_debugger.cc", |
| "worker_thread_debugger.h", |
| ] |
| } |
| |
| # inspector protocol ----------------------------------------------------------- |
| |
| inspector_protocol_generate("protocol_sources") { |
| inspector_protocol_dir = _inspector_protocol_dir |
| out_dir = blink_core_output_dir |
| |
| config_file = "inspector_protocol_config.json" |
| _imported = rebase_path(v8_inspector_js_protocol, root_build_dir) |
| config_values = [ "imported.path=$_imported" ] |
| |
| inputs = [ |
| "browser_protocol.pdl", |
| v8_inspector_js_protocol, |
| "inspector_protocol_config.json", |
| ] |
| |
| # These are relative to blink_core_output_dir. |
| outputs = [ |
| "inspector/protocol/Accessibility.cpp", |
| "inspector/protocol/Accessibility.h", |
| "inspector/protocol/Animation.cpp", |
| "inspector/protocol/Animation.h", |
| "inspector/protocol/ApplicationCache.cpp", |
| "inspector/protocol/ApplicationCache.h", |
| "inspector/protocol/Audits.cpp", |
| "inspector/protocol/Audits.h", |
| "inspector/protocol/CacheStorage.cpp", |
| "inspector/protocol/CacheStorage.h", |
| "inspector/protocol/CSS.cpp", |
| "inspector/protocol/CSS.h", |
| "inspector/protocol/Database.cpp", |
| "inspector/protocol/Database.h", |
| "inspector/protocol/Debugger.h", |
| "inspector/protocol/DeviceOrientation.cpp", |
| "inspector/protocol/DeviceOrientation.h", |
| "inspector/protocol/DOM.cpp", |
| "inspector/protocol/DOMDebugger.cpp", |
| "inspector/protocol/DOMDebugger.h", |
| "inspector/protocol/DOM.h", |
| "inspector/protocol/DOMSnapshot.cpp", |
| "inspector/protocol/DOMSnapshot.h", |
| "inspector/protocol/DOMStorage.cpp", |
| "inspector/protocol/DOMStorage.h", |
| "inspector/protocol/Emulation.cpp", |
| "inspector/protocol/Emulation.h", |
| "inspector/protocol/Forward.h", |
| "inspector/protocol/IndexedDB.cpp", |
| "inspector/protocol/IndexedDB.h", |
| "inspector/protocol/IO.cpp", |
| "inspector/protocol/IO.h", |
| "inspector/protocol/LayerTree.cpp", |
| "inspector/protocol/LayerTree.h", |
| "inspector/protocol/Log.cpp", |
| "inspector/protocol/Log.h", |
| "inspector/protocol/Memory.cpp", |
| "inspector/protocol/Memory.h", |
| "inspector/protocol/Network.cpp", |
| "inspector/protocol/Network.h", |
| "inspector/protocol/Overlay.cpp", |
| "inspector/protocol/Overlay.h", |
| "inspector/protocol/Page.cpp", |
| "inspector/protocol/Page.h", |
| "inspector/protocol/Performance.cpp", |
| "inspector/protocol/Performance.h", |
| "inspector/protocol/Protocol.cpp", |
| "inspector/protocol/Protocol.h", |
| "inspector/protocol/Runtime.h", |
| "inspector/protocol/Security.cpp", |
| "inspector/protocol/Security.h", |
| "inspector/protocol/Testing.cpp", |
| "inspector/protocol/Testing.h", |
| ] |
| |
| deps = [ |
| ":protocol_version", |
| ] |
| } |
| |
| # Compiles the sources generated above. |
| jumbo_source_set("generated") { |
| sources = get_target_outputs(":protocol_sources") |
| |
| configs -= core_config_remove |
| configs += core_config_add + [ |
| "../..:inside_blink", |
| "//third_party/blink/renderer/core:core_include_dirs", |
| ] |
| |
| if (is_win) { |
| cflags = [ "/wd4702" ] # Unreachable code. |
| } |
| |
| deps = [ |
| ":protocol_sources", |
| "//skia", |
| "//third_party/blink/renderer/bindings/core/v8:bindings_core_v8_generated", |
| "//third_party/blink/renderer/core:all_generators", |
| "//third_party/blink/renderer/core/probe:generated", |
| "//third_party/blink/renderer/platform:make_platform_generated", |
| "//third_party/blink/renderer/platform/wtf", |
| "//v8", |
| ] |
| } |
| |
| action("protocol_compatibility_check") { |
| script = _inspector_protocol_dir + "/check_protocol_compatibility.py" |
| |
| inputs = [ |
| "browser_protocol.pdl", |
| "browser_protocol-1.3.json", |
| v8_inspector_js_protocol, |
| ] |
| _stamp = "$blink_core_output_dir/inspector/browser_protocol.stamp" |
| outputs = [ |
| _stamp, |
| ] |
| |
| args = [ |
| "--stamp", |
| rebase_path(_stamp, root_build_dir), |
| rebase_path("browser_protocol.pdl", root_build_dir), |
| rebase_path(v8_inspector_js_protocol, root_build_dir), |
| ] |
| } |
| |
| action("protocol_version") { |
| deps = [ |
| ":protocol_compatibility_check", |
| ] |
| script = _inspector_protocol_dir + "/concatenate_protocols.py" |
| |
| inputs = [ |
| "browser_protocol.pdl", |
| v8_inspector_js_protocol, |
| ] |
| output_file = "$blink_core_output_dir/inspector/protocol.json" |
| outputs = [ |
| output_file, |
| ] |
| |
| args = [ |
| rebase_path("browser_protocol.pdl", root_build_dir), |
| rebase_path(v8_inspector_js_protocol, root_build_dir), |
| rebase_path(output_file, root_build_dir), |
| ] |
| } |