1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83

ash / webui / annotator / BUILD.gn [blame]

# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/buildflag_header.gni")
import("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash, "Projector App is ash-chrome only")

static_library("annotator") {
  sources = [
    "annotations_overlay_view_impl.cc",
    "annotations_overlay_view_impl.h",
    "annotator_client_impl.cc",
    "annotator_client_impl.h",
    "untrusted_annotator_page_handler_impl.cc",
    "untrusted_annotator_page_handler_impl.h",
    "untrusted_annotator_ui.cc",
    "untrusted_annotator_ui.h",
  ]

  deps = [
    "//ash",
    "//ash/public/cpp",
    "//ash/strings",
    "//ash/webui/annotator/mojom:annotator_mojo_bindings",
    "//ash/webui/annotator/public/mojom:annotator_mojo_bindings",
    "//ash/webui/annotator/resources/untrusted:resources",
    "//ash/webui/media_app_ui:buildflags",
    "//ash/webui/resources:media_app_bundle_resources",
    "//ash/webui/resources:projector_app_bundle_resources",
    "//ash/webui/resources:projector_common_resources",
    "//chromeos/ash/components/browser_context_helper",
    "//content/public/browser",
    "//mojo/public/cpp/bindings",
    "//ui/views/controls/webview",
    "//ui/webui",
  ]

  public_deps = [
    "//ash/webui/annotator/public/cpp",
    "//ash/webui/projector_app/public/cpp",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "test/mock_annotator_client.cc",
    "test/mock_annotator_client.h",
    "test/mock_untrusted_annotator_page.cc",
    "test/mock_untrusted_annotator_page.h",
  ]

  public_deps = [
    "//ash/public/cpp:cpp",
    "//ash/public/cpp:test_support",
    "//ash/webui/annotator/mojom:annotator_mojo_bindings",
    "//ash/webui/annotator/public/cpp",
    "//ash/webui/annotator/public/mojom:annotator_mojo_bindings",
    "//base/test:test_support",
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "test/annotator_client_impl_unittest.cc",
    "test/untrusted_annotator_page_handler_impl_unittest.cc",
  ]

  deps = [
    ":annotator",
    ":test_support",
    "//ash/webui/annotator/mojom:annotator_mojo_bindings",
    "//ash/webui/annotator/public/mojom:annotator_mojo_bindings",
    "//base",
    "//content/test:test_support",
    "//mojo/public/cpp/bindings",
    "//testing/gtest",
  ]
}