chromium/chrome/browser/webshare/BUILD.gn

# Copyright 2020 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/config/chromeos/ui_mode.gni")

if (is_chromeos || is_mac) {
  static_library("storage") {
    sources = [
      "prepare_directory_task.cc",
      "prepare_directory_task.h",
      "prepare_subdirectory_task.cc",
      "prepare_subdirectory_task.h",
      "store_file_task.cc",
      "store_file_task.h",
      "store_files_task.cc",
      "store_files_task.h",
    ]
    deps = [
      "//content/public/browser",
      "//mojo/public/cpp/bindings",
    ]
    public_deps = [
      "//base",
      "//third_party/blink/public/common",
    ]
  }
}

source_set("unit_tests") {
  testonly = true

  sources = [ "share_service_unittest.cc" ]

  if (is_chromeos || is_mac) {
    sources += [ "prepare_directory_task_unittest.cc" ]
  }

  if (is_mac) {
    sources += [ "mac/sharing_service_operation_unittest.cc" ]
  }

  deps = [
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/common",
    "//chrome/test:test_support",
    "//content/public/browser",
    "//content/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (is_chromeos) {
    deps += [ "//chrome/browser/webshare/chromeos:unit_tests" ]
  }

  if (is_chromeos || is_mac) {
    deps += [ "//chrome/browser/webshare:storage" ]
  }
}