chromium/services/media_session/BUILD.gn

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

import("//testing/test.gni")

# There should be only one media session service. It is currently in the
# browser process. So, only //content/browser should link to this target.
# Others modules should only need the public targets.
source_set("lib") {
  sources = [
    "audio_focus_manager.cc",
    "audio_focus_manager.h",
    "audio_focus_request.cc",
    "audio_focus_request.h",
    "media_controller.cc",
    "media_controller.h",
    "media_session_service_impl.cc",
    "media_session_service_impl.h",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  deps = [
    "//mojo/public/cpp/bindings",
    "//services/media_session/public/cpp",
    "//services/media_session/public/mojom",
    "//skia",
  ]

  public_deps = [ "//base" ]
}

source_set("tests") {
  testonly = true
  sources = [
    "audio_focus_manager_unittest.cc",
    "media_controller_unittest.cc",
    "media_session_service_impl_unittest.cc",
  ]

  deps = [
    ":lib",
    "//base",
    "//base/test:test_support",
    "//build:chromeos_buildflags",
    "//services/media_session/public/cpp",
    "//services/media_session/public/cpp/test:test_support",
    "//services/media_session/public/mojom",
    "//testing/gtest",
  ]
}