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