[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / system_media_controls / BUILD.gn
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.
4
5 import("linux/buildflags/buildflags.gni")
6
7 component("system_media_controls") {
8   friend = [ ":unit_tests" ]
9
10   public = [
11     "system_media_controls.h",
12     "system_media_controls_observer.h",
13   ]
14
15   defines = [ "IS_SYSTEM_MEDIA_CONTROLS_IMPL" ]
16
17   deps = [
18     "//base",
19     "//services/media_session/public/cpp",
20     "//ui/gfx",
21   ]
22
23   public_deps = [ "//skia" ]
24
25   if (is_win) {
26     sources = [
27       "win/system_media_controls_win.cc",
28       "win/system_media_controls_win.h",
29     ]
30   } else if (use_mpris) {
31     sources = [
32       "linux/system_media_controls_linux.cc",
33       "linux/system_media_controls_linux.h",
34     ]
35     deps += [
36       "//build:branding_buildflags",
37       "//components/dbus/properties",
38       "//components/dbus/thread_linux",
39       "//dbus",
40     ]
41   } else if (is_mac) {
42     sources = [
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",
53     ]
54     deps += [ "//build:branding_buildflags" ]
55
56     frameworks = [ "Foundation.framework" ]
57     weak_frameworks = [ "MediaPlayer.framework" ]
58   } else {
59     sources = [ "system_media_controls_stub.cc" ]
60   }
61 }
62
63 source_set("unit_tests") {
64   testonly = true
65
66   if (use_mpris) {
67     sources = [ "linux/system_media_controls_linux_unittest.cc" ]
68     deps = [
69       ":system_media_controls",
70       "//base",
71       "//base/test:test_support",
72       "//components/dbus/thread_linux",
73       "//dbus",
74       "//dbus:test_support",
75       "//testing/gmock",
76       "//testing/gtest",
77     ]
78   }
79 }
80
81 static_library("test_support") {
82   testonly = true
83
84   sources = [
85     "mock_system_media_controls.cc",
86     "mock_system_media_controls.h",
87   ]
88
89   deps = [
90     ":system_media_controls",
91     "//base",
92     "//testing/gmock",
93   ]
94 }