Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / display / BUILD.gn
blobe664b1ae5abdf4583f6f7c17a3b43bca6e111fc5
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
6 import("//testing/test.gni")
8 if (is_chromeos) {
9   component("display") {
10     sources = [
11       "chromeos/apply_content_protection_task.cc",
12       "chromeos/apply_content_protection_task.h",
13       "chromeos/configure_displays_task.cc",
14       "chromeos/configure_displays_task.h",
15       "chromeos/display_configurator.cc",
16       "chromeos/display_configurator.h",
17       "chromeos/display_layout_manager.h",
18       "chromeos/display_util.cc",
19       "chromeos/display_util.h",
20       "chromeos/ozone/display_configurator_ozone.cc",
21       "chromeos/query_content_protection_task.cc",
22       "chromeos/query_content_protection_task.h",
23       "chromeos/update_display_configuration_task.cc",
24       "chromeos/update_display_configuration_task.h",
25       "chromeos/x11/display_configurator_x11.cc",
26       "chromeos/x11/display_mode_x11.cc",
27       "chromeos/x11/display_mode_x11.h",
28       "chromeos/x11/display_snapshot_x11.cc",
29       "chromeos/x11/display_snapshot_x11.h",
30       "chromeos/x11/display_util_x11.cc",
31       "chromeos/x11/display_util_x11.h",
32       "chromeos/x11/native_display_delegate_x11.cc",
33       "chromeos/x11/native_display_delegate_x11.h",
34       "chromeos/x11/native_display_event_dispatcher_x11.cc",
35       "chromeos/x11/native_display_event_dispatcher_x11.h",
36       "display_export.h",
37       "display_switches.cc",
38       "display_switches.h",
39     ]
41     defines = [ "DISPLAY_IMPLEMENTATION" ]
43     deps = [
44       "//base",
45       "//ui/display/types",
46       "//ui/display/util",
47       "//ui/gfx",
48       "//ui/gfx/geometry",
49     ]
51     if (use_x11) {
52       sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ]
53       configs += [
54         "//build/config/linux:x11",
55         "//build/config/linux:xext",
56         "//build/config/linux:xi",
57         "//build/config/linux:xrandr",
58       ]
59       deps += [ "//ui/events/platform" ]
60     }
62     deps += []
63     if (use_x11) {
64       deps += [ "//ui/gfx/x" ]
65     }
67     if (use_ozone) {
68       deps += [ "//ui/ozone" ]
69       sources -= [
70         "chromeos/x11/display_configurator_x11.cc",
71         "chromeos/x11/display_mode_x11.cc",
72         "chromeos/x11/display_mode_x11.h",
73         "chromeos/x11/display_snapshot_x11.cc",
74         "chromeos/x11/display_snapshot_x11.h",
75         "chromeos/x11/display_util_x11.cc",
76         "chromeos/x11/display_util_x11.h",
77         "chromeos/x11/native_display_delegate_x11.cc",
78         "chromeos/x11/native_display_delegate_x11.h",
79         "chromeos/x11/native_display_event_dispatcher_x11.cc",
80         "chromeos/x11/native_display_event_dispatcher_x11.h",
81       ]
82     }
83   }
85   component("test_util") {
86     output_name = "display_test_util"
87     sources = [
88       "chromeos/test/test_display_snapshot.cc",
89       "chromeos/test/test_display_snapshot.h",
90     ]
92     defines = [ "DISPLAY_IMPLEMENTATION" ]
94     public_deps = [
95       ":display",
96     ]
97     deps = [
98       "//base",
99       "//ui/display/types",
100       "//ui/gfx",
101       "//ui/gfx/geometry",
102     ]
103   }
105   source_set("test_support") {
106     testonly = true
107     sources = [
108       "chromeos/test/action_logger.cc",
109       "chromeos/test/action_logger.h",
110       "chromeos/test/action_logger_util.cc",
111       "chromeos/test/action_logger_util.h",
112       "chromeos/test/test_display_layout_manager.cc",
113       "chromeos/test/test_display_layout_manager.h",
114       "chromeos/test/test_native_display_delegate.cc",
115       "chromeos/test/test_native_display_delegate.h",
116     ]
118     public_deps = [
119       ":display",
120     ]
121     deps = [
122       "//base",
123       "//ui/display/types",
124       "//ui/gfx",
125       "//ui/gfx/geometry",
126     ]
127   }
130 # This test covers the ChromeOS "display" target as well as the cross-platform
131 # //display/util target.
132 test("display_unittests") {
133   sources = [
134     "chromeos/apply_content_protection_task_unittest.cc",
135     "chromeos/configure_displays_task_unittest.cc",
136     "chromeos/display_configurator_unittest.cc",
137     "chromeos/query_content_protection_task_unittest.cc",
138     "chromeos/update_display_configuration_task_unittest.cc",
139     "chromeos/x11/display_util_x11_unittest.cc",
140     "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
141     "util/display_util_unittest.cc",
142     "util/edid_parser_unittest.cc",
143   ]
145   deps = [
146     "//base",
147     "//base/test:run_all_unittests",
148     "//testing/gtest",
149     "//ui/display/util",
150     "//ui/gfx/geometry",
151   ]
153   if (is_chromeos) {
154     deps += [
155       ":display",
156       ":test_support",
157       ":test_util",
158       "//base/test:test_support",
159       "//ui/display/types",
160     ]
161   }
163   if (use_ozone && is_chromeos) {
164     sources -= [
165       "chromeos/x11/display_util_x11_unittest.cc",
166       "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
167     ]
168   }