# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//ash/webui/projector_app/projector_app.gni")
import("//build/buildflag_header.gni")
import("//build/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash, "Projector App is ash-chrome only")
static_library("projector_app") {
sources = [
"pending_screencast.cc",
"pending_screencast.h",
"projector_app_client.cc",
"projector_app_client.h",
"projector_oauth_token_fetcher.cc",
"projector_oauth_token_fetcher.h",
"projector_xhr_sender.cc",
"projector_xhr_sender.h",
"untrusted_projector_page_handler_impl.cc",
"untrusted_projector_page_handler_impl.h",
"untrusted_projector_ui.cc",
"untrusted_projector_ui.h",
]
deps = [
"//ash/public/cpp",
"//ash/strings",
"//ash/webui/annotator",
"//ash/webui/media_app_ui:buildflags",
"//ash/webui/projector_app/mojom:projector_mojo_bindings",
"//ash/webui/projector_app/public/mojom:projector_mojo_bindings",
"//ash/webui/resources:annotator_untrusted_resources",
"//ash/webui/resources:media_app_bundle_resources",
"//ash/webui/resources:projector_app_bundle_resources",
"//ash/webui/resources:projector_app_untrusted_resources",
"//ash/webui/resources:projector_common_resources",
"//chromeos/strings",
"//components/prefs",
"//components/signin/public/identity_manager",
"//content/public/browser",
"//mojo/public/cpp/bindings",
"//ui/resources",
"//ui/webui",
]
public_deps = [ "//ash/webui/projector_app/public/cpp" ]
}
source_set("test_support") {
testonly = true
sources = [
"test/mock_app_client.cc",
"test/mock_app_client.h",
"test/mock_xhr_sender.cc",
"test/mock_xhr_sender.h",
]
public_deps = [
":projector_app",
"//ash/public/cpp:cpp",
"//ash/public/cpp:test_support",
"//ash/webui/annotator",
"//ash/webui/projector_app/public/mojom:projector_mojo_bindings",
"//base/test:test_support",
"//components/signin/public/identity_manager",
"//components/signin/public/identity_manager:test_support",
"//services/network:test_support",
"//testing/gmock",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"test/projector_oauth_token_fetcher_unittest.cc",
"test/projector_xhr_sender_unittest.cc",
"test/untrusted_projector_page_handler_impl_unittest.cc",
]
deps = [
":test_support",
"//ash/webui/projector_app/mojom:projector_mojo_bindings",
"//ash/webui/projector_app/public/mojom:projector_mojo_bindings",
"//base",
"//components/prefs:test_support",
"//content/test:test_support",
"//mojo/public/cpp/bindings",
"//testing/gtest",
]
}
# Used to turn off tests that only work with our CIPD package e.g. loading ink.
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "ENABLE_CROS_PROJECTOR_APP=$enable_cros_projector_app" ]
}