Remove unused parameter.
[chromium-blink-merge.git] / ui / display / BUILD.gn
blob9b5f2ba2d026a92944b377cdfb947bf6a0b3d2c5
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 component("display") {
9   sources = [
10     "chromeos/configure_displays_task.cc",
11     "chromeos/configure_displays_task.h",
12     "chromeos/display_configurator.cc",
13     "chromeos/display_configurator.h",
14     "chromeos/display_util.cc",
15     "chromeos/display_util.h",
16     "chromeos/ozone/display_configurator_ozone.cc",
17     "chromeos/update_display_configuration_task.cc",
18     "chromeos/update_display_configuration_task.h",
19     "chromeos/x11/display_configurator_x11.cc",
20     "chromeos/x11/display_mode_x11.cc",
21     "chromeos/x11/display_mode_x11.h",
22     "chromeos/x11/display_snapshot_x11.cc",
23     "chromeos/x11/display_snapshot_x11.h",
24     "chromeos/x11/display_util_x11.cc",
25     "chromeos/x11/display_util_x11.h",
26     "chromeos/x11/native_display_delegate_x11.cc",
27     "chromeos/x11/native_display_delegate_x11.h",
28     "chromeos/x11/native_display_event_dispatcher_x11.cc",
29     "chromeos/x11/native_display_event_dispatcher_x11.h",
30     "display_export.h",
31     "display_switches.cc",
32     "display_switches.h",
33   ]
35   defines = [ "DISPLAY_IMPLEMENTATION" ]
37   deps = [
38     "//base",
39     "//ui/display/util",
40     "//ui/gfx",
41     "//ui/gfx/geometry",
42   ]
44   if (use_x11) {
45     configs += [
46       "//build/config/linux:x11",
47       "//build/config/linux:xext",
48       "//build/config/linux:xi",
49       "//build/config/linux:xrandr",
50     ]
51     deps += [ "//ui/events/platform" ]
52     if (is_chromeos) {
53       sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ]
54     }
55   }
57   if (is_chromeos) {
58     deps += [ "//ui/display/types" ]
59     if (use_x11) {
60       deps += [ "//ui/gfx/x" ]
61     }
62   }
64   if (use_ozone) {
65     deps += [ "//ui/ozone" ]
66     if (is_chromeos) {
67       sources -= [
68         "chromeos/x11/display_configurator_x11.cc",
69         "chromeos/x11/display_mode_x11.cc",
70         "chromeos/x11/display_mode_x11.h",
71         "chromeos/x11/display_snapshot_x11.cc",
72         "chromeos/x11/display_snapshot_x11.h",
73         "chromeos/x11/display_util_x11.cc",
74         "chromeos/x11/display_util_x11.h",
75         "chromeos/x11/native_display_delegate_x11.cc",
76         "chromeos/x11/native_display_delegate_x11.h",
77         "chromeos/x11/native_display_event_dispatcher_x11.cc",
78         "chromeos/x11/native_display_event_dispatcher_x11.h",
79       ]
80     }
81   }
84 component("test_util") {
85   output_name = "display_test_util"
86   sources = [
87     "chromeos/test/test_display_snapshot.cc",
88     "chromeos/test/test_display_snapshot.h",
89   ]
91   defines = [ "DISPLAY_IMPLEMENTATION" ]
93   public_deps = [
94     ":display",
95   ]
96   deps = [
97     "//base",
98     "//ui/gfx",
99     "//ui/gfx/geometry",
100   ]
102   if (is_chromeos) {
103     deps += [ "//ui/display/types" ]
104   }
107 source_set("test_support") {
108   testonly = true
109   sources = [
110     "chromeos/test/action_logger.cc",
111     "chromeos/test/action_logger.h",
112     "chromeos/test/action_logger_util.cc",
113     "chromeos/test/action_logger_util.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   ]
129 test("display_unittests") {
130   sources = [
131     "chromeos/configure_displays_task_unittest.cc",
132     "chromeos/display_configurator_unittest.cc",
133     "chromeos/update_display_configuration_task_unittest.cc",
134     "chromeos/x11/display_util_x11_unittest.cc",
135     "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
136     "util/display_util_unittest.cc",
137     "util/edid_parser_unittest.cc",
138   ]
140   deps = [
141     ":test_util",
142     "//base",
143     "//base/test:run_all_unittests",
144     "//testing/gtest",
145     "//ui/display/util",
146     "//ui/gfx/geometry",
147   ]
149   if (is_chromeos) {
150     deps += [
151       ":display",
152       ":test_support",
153       "//base/test:test_support",
154       "//ui/display/types",
155     ]
156   }
158   if (use_ozone && is_chromeos) {
159     sources -= [
160       "chromeos/x11/display_util_x11_unittest.cc",
161       "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
162     ]
163   }