| # 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("//third_party/WebKit/Source/bindings/bindings.gni") |
| import("//third_party/WebKit/Source/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 = [ |
| "ConsoleMessage.cpp", |
| "ConsoleMessage.h", |
| "ConsoleMessageStorage.cpp", |
| "ConsoleMessageStorage.h", |
| "ConsoleTypes.h", |
| "DOMEditor.cpp", |
| "DOMEditor.h", |
| "DOMPatchSupport.cpp", |
| "DOMPatchSupport.h", |
| "DevToolsHost.cpp", |
| "DevToolsHost.h", |
| "IdentifiersFactory.cpp", |
| "IdentifiersFactory.h", |
| "InspectedFrames.cpp", |
| "InspectedFrames.h", |
| "InspectorAnimationAgent.cpp", |
| "InspectorAnimationAgent.h", |
| "InspectorApplicationCacheAgent.cpp", |
| "InspectorApplicationCacheAgent.h", |
| "InspectorBaseAgent.h", |
| "InspectorCSSAgent.cpp", |
| "InspectorCSSAgent.h", |
| "InspectorDOMAgent.cpp", |
| "InspectorDOMDebuggerAgent.cpp", |
| "InspectorDOMDebuggerAgent.h", |
| "InspectorHighlight.cpp", |
| "InspectorHighlight.h", |
| "InspectorHistory.cpp", |
| "InspectorHistory.h", |
| "InspectorInputAgent.cpp", |
| "InspectorInputAgent.h", |
| "InspectorInstrumentation.cpp", |
| "InspectorInstrumentation.h", |
| "InspectorInstrumentationCustomInl.h", |
| "InspectorLayerTreeAgent.cpp", |
| "InspectorLayerTreeAgent.h", |
| "InspectorLogAgent.cpp", |
| "InspectorLogAgent.h", |
| "InspectorMemoryAgent.cpp", |
| "InspectorMemoryAgent.h", |
| "InspectorNetworkAgent.cpp", |
| "InspectorNetworkAgent.h", |
| "InspectorOverlayHost.cpp", |
| "InspectorOverlayHost.h", |
| "InspectorPageAgent.cpp", |
| "InspectorPageAgent.h", |
| "InspectorResourceContainer.cpp", |
| "InspectorResourceContainer.h", |
| "InspectorResourceContentLoader.cpp", |
| "InspectorResourceContentLoader.h", |
| "InspectorSession.cpp", |
| "InspectorSession.h", |
| "InspectorStyleSheet.cpp", |
| "InspectorStyleSheet.h", |
| "InspectorTaskRunner.cpp", |
| "InspectorTaskRunner.h", |
| "InspectorTraceEvents.cpp", |
| "InspectorTraceEvents.h", |
| "InspectorTracingAgent.cpp", |
| "InspectorTracingAgent.h", |
| "InspectorWorkerAgent.cpp", |
| "InspectorWorkerAgent.h", |
| "LayoutEditor.cpp", |
| "LayoutEditor.h", |
| "MainThreadDebugger.cpp", |
| "MainThreadDebugger.h", |
| "NetworkResourcesData.cpp", |
| "NetworkResourcesData.h", |
| "ThreadDebugger.cpp", |
| "ThreadDebugger.h", |
| "V8InspectorString.cpp", |
| "V8InspectorString.h", |
| "WorkerInspectorController.cpp", |
| "WorkerInspectorController.h", |
| "WorkerThreadDebugger.cpp", |
| "WorkerThreadDebugger.h", |
| ] |
| |
| configs += [ |
| # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| "//build/config/compiler:no_size_t_to_int_warning", |
| ] |
| } |
| |
| action("instrumentation_sources") { |
| visibility = [ ":*" ] |
| script = "CodeGeneratorInstrumentation.py" |
| |
| inputs = [ |
| # Input file for the script. |
| "InspectorInstrumentation.idl", |
| ] |
| |
| outputs = [ |
| "$blink_core_output_dir/InspectorInstrumentationInl.h", |
| "$blink_core_output_dir/InspectorOverridesInl.h", |
| "$blink_core_output_dir/InstrumentingAgents.h", |
| "$blink_core_output_dir/InspectorInstrumentationImpl.cpp", |
| ] |
| |
| args = [ |
| rebase_path("InspectorInstrumentation.idl", root_build_dir), |
| "--output_dir", |
| rebase_path(blink_core_output_dir, root_build_dir), |
| ] |
| } |
| |
| # 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.json", |
| 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/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/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/Input.cpp", |
| "inspector/protocol/Input.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/Page.cpp", |
| "inspector/protocol/Page.h", |
| "inspector/protocol/Protocol.cpp", |
| "inspector/protocol/Protocol.h", |
| "inspector/protocol/Rendering.cpp", |
| "inspector/protocol/Rendering.h", |
| "inspector/protocol/Runtime.h", |
| "inspector/protocol/Security.cpp", |
| "inspector/protocol/Security.h", |
| "inspector/protocol/Target.cpp", |
| "inspector/protocol/Target.h", |
| "inspector/protocol/Tracing.cpp", |
| "inspector/protocol/Tracing.h", |
| ] |
| |
| deps = [ |
| ":protocol_version", |
| ] |
| } |
| |
| # Compiles the sources generated above. |
| source_set("generated") { |
| sources = get_target_outputs(":protocol_sources") + |
| get_target_outputs(":instrumentation_sources") |
| |
| configs -= core_config_remove |
| configs += core_config_add + [ |
| "../..:inside_blink", |
| "//third_party/WebKit/Source/core:core_include_dirs", |
| ] |
| |
| if (is_win) { |
| cflags = [ "/wd4702" ] # Unreachable code. |
| } |
| |
| deps = [ |
| ":instrumentation_sources", |
| ":protocol_sources", |
| "//skia", |
| "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated", |
| "//third_party/WebKit/Source/core:all_generators", |
| "//third_party/WebKit/Source/platform:make_platform_generated", |
| "//third_party/WebKit/Source/wtf", |
| "//v8", |
| ] |
| } |
| |
| action("protocol_compatibility_check") { |
| script = _inspector_protocol_dir + "/CheckProtocolCompatibility.py" |
| |
| inputs = [ |
| "browser_protocol.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.json", root_build_dir), |
| rebase_path(v8_inspector_js_protocol, root_build_dir), |
| ] |
| } |
| |
| action("protocol_version") { |
| deps = [ |
| ":protocol_compatibility_check", |
| ] |
| script = _inspector_protocol_dir + "/ConcatenateProtocols.py" |
| |
| inputs = [ |
| "browser_protocol.json", |
| v8_inspector_js_protocol, |
| ] |
| output_file = "$blink_core_output_dir/inspector/protocol.json" |
| outputs = [ |
| output_file, |
| ] |
| |
| args = [ |
| rebase_path("browser_protocol.json", root_build_dir), |
| rebase_path(v8_inspector_js_protocol, root_build_dir), |
| rebase_path(output_file, root_build_dir), |
| ] |
| } |