chromium/components/media_message_center/BUILD.gn

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

component("media_message_center") {
  sources = [
    "media_controls_progress_view.cc",
    "media_controls_progress_view.h",
    "media_notification_background.h",
    "media_notification_background_ash_impl.cc",
    "media_notification_background_ash_impl.h",
    "media_notification_background_impl.cc",
    "media_notification_background_impl.h",
    "media_notification_container.h",
    "media_notification_item.cc",
    "media_notification_item.h",
    "media_notification_util.cc",
    "media_notification_util.h",
    "media_notification_view.cc",
    "media_notification_view.h",
    "media_notification_view_impl.cc",
    "media_notification_view_impl.h",
    "media_notification_volume_slider_view.cc",
    "media_notification_volume_slider_view.h",
    "notification_theme.cc",
    "notification_theme.h",
  ]

  defines = [ "IS_MEDIA_MESSAGE_CENTER_IMPL" ]

  public_deps = [
    "//services/media_session/public/mojom",
    "//third_party/abseil-cpp:absl",
  ]

  deps = [
    "//base",
    "//components/media_message_center/vector_icons",
    "//components/strings:components_strings_grit",
    "//components/url_formatter",
    "//components/vector_icons",
    "//services/media_session/public/cpp",
    "//skia",
    "//ui/accessibility",
    "//ui/color",
    "//ui/message_center",
    "//ui/native_theme",
    "//ui/views",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "media_controls_progress_view_unittest.cc",
    "media_notification_background_ash_impl_unittest.cc",
    "media_notification_background_impl_unittest.cc",
    "media_notification_view_impl_unittest.cc",
    "media_notification_volume_slider_view_unittest.cc",
  ]

  deps = [
    ":media_message_center",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//services/media_session/public/cpp/test:test_support",
    "//services/media_session/public/mojom",
    "//skia",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/accessibility",
    "//ui/gfx:test_support",
    "//ui/message_center",
    "//ui/native_theme:test_support",
    "//ui/views",
    "//ui/views:test_support",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "mock_media_notification_item.cc",
    "mock_media_notification_item.h",
    "mock_media_notification_view.cc",
    "mock_media_notification_view.h",
  ]

  deps = [
    ":media_message_center",
    "//services/media_session/public/mojom",
    "//skia",
    "//testing/gmock",
  ]
}