blob: 3dc164a455e1e6aea9fb156c675adc8b6280d7dc [file] [log] [blame]
# Copyright 2018 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.
assert(is_fuchsia)
import("//build/config/fuchsia/fidl_library.gni")
import("//build/config/fuchsia/rules.gni")
import("//testing/test.gni")
import("//tools/grit/repack.gni")
config("webrunner_implementation") {
defines = [ "WEBRUNNER_IMPLEMENTATION" ]
}
# Uber-target, used by buildbots and :gn_all for discovery of all buildable
# webrunner code.
group("webrunner") {
testonly = true
deps = [
":runner_pkg",
":service_pkg",
":service_unittests",
]
}
fuchsia_package("runner_pkg") {
binary = ":runner_exe"
package_name_override = "web_runner"
}
fuchsia_package_runner("runner") {
package = ":runner_pkg"
package_name_override = "web_runner"
package_deps = [ [
":service_pkg",
"chromium",
] ]
}
executable("runner_exe") {
sources = [
"app/component_controller_impl.cc",
"app/component_controller_impl.h",
"app/main.cc",
"app/web_content_runner.cc",
"app/web_content_runner.h",
]
deps = [
":fidl",
"//base",
"//url",
]
}
fuchsia_package("service_pkg") {
binary = ":service_exe"
package_name_override = "chromium"
}
executable("service_exe") {
deps = [
":fidl",
":service_lib",
"//base",
"//content/public/app:both",
]
sources = [
"service/web_content_service_main.cc",
]
}
component("service_lib") {
deps = [
":service_pak",
"//base",
"//components/version_info",
"//content/public/app:both",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
"//content/public/renderer",
"//services/network/public/cpp",
"//services/service_manager/embedder:embedder_switches",
"//ui/display",
]
data_deps = [
":service_pak",
]
data = [
"$root_out_dir/webrunner.pak",
]
public_deps = [
":fidl",
]
configs += [ ":webrunner_implementation" ]
sources = [
"browser/webrunner_browser_context.cc",
"browser/webrunner_browser_context.h",
"browser/webrunner_browser_main.cc",
"browser/webrunner_browser_main.h",
"browser/webrunner_browser_main_parts.cc",
"browser/webrunner_browser_main_parts.h",
"browser/webrunner_content_browser_client.cc",
"browser/webrunner_content_browser_client.h",
"browser/webrunner_net_log.cc",
"browser/webrunner_net_log.h",
"browser/webrunner_screen.cc",
"browser/webrunner_screen.h",
"browser/webrunner_url_request_context_getter.cc",
"browser/webrunner_url_request_context_getter.h",
"common/webrunner_content_client.cc",
"common/webrunner_content_client.h",
"common/webrunner_export.h",
"service/common.cc",
"service/common.h",
"service/context_impl.cc",
"service/context_impl.h",
"service/context_provider_impl.cc",
"service/context_provider_impl.h",
"service/context_provider_main.cc",
"service/context_provider_main.h",
"service/frame_impl.cc",
"service/frame_impl.h",
"service/webrunner_main_delegate.cc",
"service/webrunner_main_delegate.h",
]
}
repack("service_pak") {
sources = [
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/components/strings/components_strings_en-US.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
"$root_gen_dir/content/app/strings/content_strings_en-US.pak",
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/net/net_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak",
"$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
"$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
"$root_gen_dir/ui/strings/ui_strings_en-US.pak",
]
deps = [
"//components/resources:components_resources",
"//components/strings",
"//content:resources",
"//content/app/resources",
"//content/app/strings",
"//content/browser/devtools:resources",
"//content/browser/tracing:resources",
"//mojo/public/js:resources",
"//net:net_resources",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources_100_percent",
"//ui/resources",
"//ui/strings",
]
output = "$root_out_dir/webrunner.pak"
}
test("service_unittests") {
sources = [
"service/context_provider_impl_unittest.cc",
]
deps = [
":fidl",
":service_lib",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
fidl_library("fidl") {
library_name = "web"
namespace = "chromium"
namespace_path = "chromium"
sources = [
"fidl/context.fidl",
"fidl/context_provider.fidl",
"fidl/frame.fidl",
"fidl/frame_observer.fidl",
"fidl/navigation_controller.fidl",
]
public_deps = [
"//third_party/fuchsia-sdk:gfx",
"//third_party/fuchsia-sdk:sys",
"//third_party/fuchsia-sdk:views_v1",
]
}