chromium/ios/chrome/common/ui/util/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/buildflag_header.gni")
import("//build/config/apple/swift_source_set.gni")
import("//build/config/ios/ios_sdk.gni")

source_set("util") {
  sources = [
    "background_util.h",
    "background_util.mm",
    "button_util.h",
    "button_util.mm",
    "constraints_ui_util.h",
    "constraints_ui_util.mm",
    "device_util.h",
    "device_util.mm",
    "pointer_interaction_util.h",
    "pointer_interaction_util.mm",
    "text_view_util.h",
    "text_view_util.mm",
    "ui_util.h",
    "ui_util.mm",
  ]
  deps = [
    "//base",
    "//ios/chrome/common:constants",
    "//ios/chrome/common/ui/colors",
    "//ui/gfx/ios:uikit_util",
  ]
}

source_set("dynamic_type_util") {
  sources = [
    "dynamic_type_util.h",
    "dynamic_type_util.mm",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("image_util") {
  sources = [
    "image_util.h",
    "image_util.mm",
  ]
  deps = [ "//ui/gfx:resize_image_dimensions" ]
  frameworks = [
    "UIKit.framework",
    "CoreImage.framework",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "dynamic_type_util_unittest.mm",
    "image_util_unittest.mm",
    "ui_util_unittest.mm",
  ]
  deps = [
    ":dynamic_type_util",
    ":image_util",
    ":util",
    "//base",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}