blob: 8925106a3d5c6bc228a6f834aad01f5054d70ae2 [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.
source_set("components") {
sources = [
"app_registrar.cc",
"app_registrar.h",
"app_registrar_observer.h",
"externally_installed_web_app_prefs.cc",
"externally_installed_web_app_prefs.h",
"install_bounce_metric.cc",
"install_bounce_metric.h",
"install_finalizer.h",
"install_manager.cc",
"install_manager.h",
"install_manager_observer.h",
"install_options.cc",
"install_options.h",
"pending_app_manager.cc",
"pending_app_manager.h",
"policy/web_app_policy_constants.cc",
"policy/web_app_policy_constants.h",
"policy/web_app_policy_manager.cc",
"policy/web_app_policy_manager.h",
"web_app_audio_focus_id_map.cc",
"web_app_audio_focus_id_map.h",
"web_app_constants.h",
"web_app_data_retriever.cc",
"web_app_data_retriever.h",
"web_app_helpers.cc",
"web_app_helpers.h",
"web_app_icon_generator.cc",
"web_app_icon_generator.h",
"web_app_install_utils.cc",
"web_app_install_utils.h",
"web_app_provider_base.cc",
"web_app_provider_base.h",
"web_app_provider_base_factory.cc",
"web_app_provider_base_factory.h",
"web_app_shortcut.cc",
"web_app_shortcut.h",
"web_app_shortcut_chromeos.cc",
"web_app_shortcut_mac.h",
"web_app_shortcut_mac.mm",
"web_app_shortcut_win.cc",
"web_app_shortcut_win.h",
"web_app_tab_helper_base.cc",
"web_app_tab_helper_base.h",
"web_app_ui_manager.h",
"web_app_url_loader.cc",
"web_app_url_loader.h",
"web_app_utils.cc",
"web_app_utils.h",
# TODO(nigeltao): move these two files from
# //chrome/browser/web_applications/components to a stand-alone
# //components/web_app_icon_downloader?
#
# There's also //components/favicon, //components/image_fetcher as well as
# code split between //content/public/browser/manifest_icon_downloader.h
# and //content/browser/manfest/manifest_icon_downloader.cc. Some or all of
# those might be similar enough to merge.
"web_app_icon_downloader.cc",
"web_app_icon_downloader.h",
]
if (is_desktop_linux) {
# Desktop linux, doesn't count ChromeOS.
sources += [
"web_app_shortcut_linux.cc",
"web_app_shortcut_linux.h",
]
}
deps = [
"//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:chrome_unscaled_resources",
"//chrome/browser/web_applications:web_app_group",
"//chrome/common",
"//components/crx_file",
"//components/favicon/content",
"//components/keyed_service/content",
"//components/pref_registry",
"//components/user_manager:user_manager",
"//content/public/browser",
"//extensions/common:common_constants",
"//skia",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"pending_app_manager_unittest.cc",
"web_app_data_retriever_unittest.cc",
"web_app_helpers_unittest.cc",
"web_app_icon_downloader_unittest.cc",
"web_app_icon_generator_unittest.cc",
"web_app_install_utils_unittest.cc",
"web_app_shortcut_mac_unittest.mm",
"web_app_shortcut_unittest.cc",
"web_app_utils_unittest.cc",
]
if (is_desktop_linux) {
# Desktop linux, doesn't count ChromeOS.
sources += [ "web_app_shortcut_linux_unittest.cc" ]
}
deps = [
":components",
"//base/test:test_support",
"//chrome/app/theme:theme_resources",
"//chrome/browser/web_applications:web_app_test_group",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/test:test_support",
"//content/public/browser",
"//skia",
"//testing/gmock",
"//testing/gtest",
]
if (is_chromeos) {
deps += [ "//chrome/browser/chromeos" ]
}
}
source_set("browser_tests") {
testonly = true
sources = [
"web_app_url_loader_browsertest.cc",
]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
deps = [
"//chrome/browser/web_applications/components",
"//chrome/test:test_support",
"//chrome/test:test_support_ui",
"//net:test_support",
]
}