blob: de6d0c0d889c96900b6487bca083f0b916232433 [file] [log] [blame]
# 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/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 = [
"AddStringToDigestor.cpp",
"AddStringToDigestor.h",
"ConsoleMessage.cpp",
"ConsoleMessage.h",
"ConsoleMessageStorage.cpp",
"ConsoleMessageStorage.h",
"ConsoleTypes.h",
"DOMEditor.cpp",
"DOMEditor.h",
"DOMPatchSupport.cpp",
"DOMPatchSupport.h",
"DevToolsEmulator.cpp",
"DevToolsEmulator.h",
"DevToolsHost.cpp",
"DevToolsHost.h",
"IdentifiersFactory.cpp",
"IdentifiersFactory.h",
"InspectedFrames.cpp",
"InspectedFrames.h",
"InspectorAnimationAgent.cpp",
"InspectorAnimationAgent.h",
"InspectorApplicationCacheAgent.cpp",
"InspectorApplicationCacheAgent.h",
"InspectorAuditsAgent.cpp",
"InspectorAuditsAgent.h",
"InspectorBaseAgent.h",
"InspectorCSSAgent.cpp",
"InspectorCSSAgent.h",
"InspectorDOMAgent.cpp",
"InspectorDOMAgent.h",
"InspectorDOMDebuggerAgent.cpp",
"InspectorDOMDebuggerAgent.h",
"InspectorDOMSnapshotAgent.cpp",
"InspectorDOMSnapshotAgent.h",
"InspectorEmulationAgent.cpp",
"InspectorEmulationAgent.h",
"InspectorFrontendClient.h",
"InspectorHighlight.cpp",
"InspectorHighlight.h",
"InspectorHistory.cpp",
"InspectorHistory.h",
"InspectorIOAgent.cpp",
"InspectorIOAgent.h",
"InspectorLayerTreeAgent.cpp",
"InspectorLayerTreeAgent.h",
"InspectorLogAgent.cpp",
"InspectorLogAgent.h",
"InspectorMemoryAgent.cpp",
"InspectorMemoryAgent.h",
"InspectorNetworkAgent.cpp",
"InspectorNetworkAgent.h",
"InspectorOverlayAgent.cpp",
"InspectorOverlayAgent.h",
"InspectorOverlayHost.cpp",
"InspectorOverlayHost.h",
"InspectorPageAgent.cpp",
"InspectorPageAgent.h",
"InspectorPerformanceAgent.cpp",
"InspectorPerformanceAgent.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",
"MainThreadDebugger.cpp",
"MainThreadDebugger.h",
"NetworkResourcesData.cpp",
"NetworkResourcesData.h",
"ResolveNode.cpp",
"ResolveNode.h",
"ThreadDebugger.cpp",
"ThreadDebugger.h",
"V8InspectorString.cpp",
"V8InspectorString.h",
"WorkerInspectorController.cpp",
"WorkerInspectorController.h",
"WorkerThreadDebugger.cpp",
"WorkerThreadDebugger.h",
]
jumbo_excluded_sources = [
# Collides with InspectorPageAgent.cpp and
# NetworkResourcesData.cpp (patch incoming)
"InspectorNetworkAgent.cpp",
# Collides with InspectorPageAgent.cpp (patch incoming)
"MainThreadDebugger.cpp",
]
}
# 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 = [
"$blink_core_output_dir/inspector/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/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/Target.cpp",
"inspector/protocol/Target.h",
"inspector/protocol/Tracing.cpp",
"inspector/protocol/Tracing.h",
]
deps = [
":protocol_convert_to_json",
":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/WebKit/Source/core:core_include_dirs",
]
if (is_win) {
cflags = [ "/wd4702" ] # Unreachable code.
}
deps = [
":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/core/probe:generated",
"//third_party/WebKit/Source/platform:make_platform_generated",
"//third_party/WebKit/Source/platform/wtf",
"//v8",
]
}
action("protocol_convert_to_json") {
script = _inspector_protocol_dir + "/ConvertProtocolToJSON.py"
inputs = [
"browser_protocol.pdl",
]
output_file = "$blink_core_output_dir/inspector/browser_protocol.json"
outputs = [
output_file,
]
args = [
rebase_path("browser_protocol.pdl", root_build_dir),
rebase_path(output_file, root_build_dir),
]
}
action("protocol_compatibility_check") {
script = _inspector_protocol_dir + "/CheckProtocolCompatibility.py"
deps = [
":protocol_convert_to_json",
]
inputs = [
"$blink_core_output_dir/inspector/browser_protocol.json",
"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("$blink_core_output_dir/inspector/browser_protocol.json",
root_build_dir),
rebase_path(v8_inspector_js_protocol, root_build_dir),
]
}
action("protocol_version") {
deps = [
":protocol_compatibility_check",
":protocol_convert_to_json",
]
script = _inspector_protocol_dir + "/ConcatenateProtocols.py"
inputs = [
"$blink_core_output_dir/inspector/browser_protocol.json",
v8_inspector_js_protocol,
]
output_file = "$blink_core_output_dir/inspector/protocol.json"
outputs = [
output_file,
]
args = [
rebase_path("$blink_core_output_dir/inspector/browser_protocol.json",
root_build_dir),
rebase_path(v8_inspector_js_protocol, root_build_dir),
rebase_path(output_file, root_build_dir),
]
}