1 # Copyright 2019 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("linux/buildflags/buildflags.gni")
7 component("system_media_controls") {
8 friend = [ ":unit_tests" ]
11 "system_media_controls.h",
12 "system_media_controls_observer.h",
15 defines = [ "IS_SYSTEM_MEDIA_CONTROLS_IMPL" ]
19 "//services/media_session/public/cpp",
23 public_deps = [ "//skia" ]
27 "win/system_media_controls_win.cc",
28 "win/system_media_controls_win.h",
30 } else if (use_mpris) {
32 "linux/system_media_controls_linux.cc",
33 "linux/system_media_controls_linux.h",
36 "//build:branding_buildflags",
37 "//components/dbus/properties",
38 "//components/dbus/thread_linux",
43 "mac/now_playing_info_center_delegate.h",
44 "mac/now_playing_info_center_delegate.mm",
45 "mac/now_playing_info_center_delegate_cocoa.h",
46 "mac/now_playing_info_center_delegate_cocoa.mm",
47 "mac/remote_command_center_delegate.h",
48 "mac/remote_command_center_delegate.mm",
49 "mac/remote_command_center_delegate_cocoa.h",
50 "mac/remote_command_center_delegate_cocoa.mm",
51 "mac/system_media_controls_mac.h",
52 "mac/system_media_controls_mac.mm",
54 deps += [ "//build:branding_buildflags" ]
56 frameworks = [ "Foundation.framework" ]
57 weak_frameworks = [ "MediaPlayer.framework" ]
59 sources = [ "system_media_controls_stub.cc" ]
63 source_set("unit_tests") {
67 sources = [ "linux/system_media_controls_linux_unittest.cc" ]
69 ":system_media_controls",
71 "//base/test:test_support",
72 "//components/dbus/thread_linux",
74 "//dbus:test_support",
81 static_library("test_support") {
85 "mock_system_media_controls.cc",
86 "mock_system_media_controls.h",
90 ":system_media_controls",