blob: 567027e80efe5adfa4ae5daca7752c2a85f72411 [file] [log] [blame]
# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
static_library("debug") {
has_pedantic_warnings = true
sources = [
"backend/agent_base.cc",
"backend/agent_base.h",
"backend/command_map.h",
"backend/css_agent.cc",
"backend/css_agent.h",
"backend/debug_backend.cc",
"backend/debug_backend.h",
"backend/debug_dispatcher.cc",
"backend/debug_dispatcher.h",
"backend/debug_module.cc",
"backend/debug_module.h",
"backend/debug_script_runner.cc",
"backend/debug_script_runner.h",
"backend/debugger_hooks_impl.cc",
"backend/debugger_hooks_impl.h",
"backend/dom_agent.cc",
"backend/dom_agent.h",
"backend/log_agent.cc",
"backend/log_agent.h",
"backend/overlay_agent.cc",
"backend/overlay_agent.h",
"backend/page_agent.cc",
"backend/page_agent.h",
"backend/render_layer.cc",
"backend/render_layer.h",
"backend/render_overlay.cc",
"backend/render_overlay.h",
"backend/script_debugger_agent.cc",
"backend/script_debugger_agent.h",
"backend/tracing_agent.cc",
"backend/tracing_agent.h",
"command.h",
"console/debug_hub.cc",
"console/debug_hub.h",
"console/debugger_event_target.cc",
"console/debugger_event_target.h",
"debug_client.cc",
"debug_client.h",
"json_object.cc",
"json_object.h",
"remote/debug_web_server.cc",
"remote/debug_web_server.h",
]
deps = [
":console_command_manager",
":copy_backend_web_files",
":copy_console_web_files",
":copy_remote_web_files",
"//cobalt/base",
"//cobalt/cssom",
"//cobalt/dom",
"//cobalt/layout",
"//cobalt/math",
"//cobalt/render_tree",
"//cobalt/script",
"//cobalt/speech",
"//net",
"//net:http_server",
"//starboard",
"//third_party/devtools:devtools_frontend_resources",
]
}
# Anything that implements a console command can depend on this without
# depending on the whole debug module.
static_library("console_command_manager") {
# Everything is conditional so implementers of commands can depend on
# this unconditionally.
if (!is_gold) {
sources = [
"console/command_manager.cc",
"console/command_manager.h",
]
deps = [ "//cobalt/base" ]
}
}
copy("copy_backend_web_files") {
install_content = true
sources = [
"backend/content/css_agent.js",
"backend/content/dom_agent.js",
"backend/content/overlay_agent.js",
]
# Canonically this should be "cobalt/debug/backend" to match the source
# path, but we put it in the root of the content dir to reduce depth.
outputs = [ "$sb_static_contents_output_data_dir/web/debug_backend/{{source_file_part}}" ]
}
copy("copy_console_web_files") {
sources = [
"console/content/command_input.js",
"console/content/console_manager.js",
"console/content/console_values.js",
"console/content/debug_commands.js",
"console/content/debug_console.css",
"console/content/debug_console.html",
"console/content/debug_console.js",
"console/content/debugger_client.js",
"console/content/media_console.js",
"console/content/media_console_context.js",
"console/content/message_log.js",
"console/content/pirate.jpg",
]
# Canonically this should be "cobalt/debug/console" to match the source
# path, but we put it in the root of the content dir to reduce depth.
outputs = [ "$sb_static_contents_output_data_dir/web/debug_console/{{source_file_part}}" ]
}
copy("copy_remote_web_files") {
sources = [
"remote/content/cobalt-logo-180.png",
"remote/content/favicon.ico",
"remote/content/index.html",
"remote/content/json/index.json",
]
# Canonically this should be "cobalt/debug/remote" to match the source
# path, but we put it in the root of the content dir to reduce depth.
outputs = [
"$sb_static_contents_output_data_dir/web/debug_remote/{{source_file_part}}",
]
}