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/util", |
45 "//ui/gfx", | 46 "//ui/gfx", |
46 "//ui/gfx/geometry", | 47 "//ui/gfx/geometry", |
47 ] | 48 ] |
48 | 49 |
49 if (use_x11) { | 50 if (use_x11) { |
50 configs += [ | 51 configs += [ |
51 "//build/config/linux:x11", | 52 "//build/config/linux:x11", |
52 "//build/config/linux:xext", | 53 "//build/config/linux:xext", |
53 "//build/config/linux:xi", | 54 "//build/config/linux:xi", |
54 "//build/config/linux:xrandr", | 55 "//build/config/linux:xrandr", |
55 ] | 56 ] |
56 deps += [ "//ui/events/platform" ] | 57 deps += [ "//ui/events/platform" ] |
58 if (is_chromeos) { | |
Dirk Pranke
2015/04/24 22:02:49
these (here and line 63) if (is_chromeos) checks a
| |
59 sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ] | |
60 } | |
61 } | |
62 | |
57 if (is_chromeos) { | 63 if (is_chromeos) { |
58 sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ] | 64 deps += [ "//ui/display/types" ] |
65 if (use_x11) { | |
66 deps += [ "//ui/gfx/x" ] | |
67 } | |
68 } | |
69 | |
70 if (use_ozone) { | |
71 deps += [ "//ui/ozone" ] | |
72 if (is_chromeos) { | |
73 sources -= [ | |
74 "chromeos/x11/display_configurator_x11.cc", | |
75 "chromeos/x11/display_mode_x11.cc", | |
76 "chromeos/x11/display_mode_x11.h", | |
77 "chromeos/x11/display_snapshot_x11.cc", | |
78 "chromeos/x11/display_snapshot_x11.h", | |
79 "chromeos/x11/display_util_x11.cc", | |
80 "chromeos/x11/display_util_x11.h", | |
81 "chromeos/x11/native_display_delegate_x11.cc", | |
82 "chromeos/x11/native_display_delegate_x11.h", | |
83 "chromeos/x11/native_display_event_dispatcher_x11.cc", | |
84 "chromeos/x11/native_display_event_dispatcher_x11.h", | |
85 ] | |
86 } | |
59 } | 87 } |
60 } | 88 } |
61 | 89 |
62 if (is_chromeos) { | 90 component("test_util") { |
63 deps += [ "//ui/display/types" ] | 91 output_name = "display_test_util" |
64 if (use_x11) { | 92 sources = [ |
65 deps += [ "//ui/gfx/x" ] | 93 "chromeos/test/test_display_snapshot.cc", |
94 "chromeos/test/test_display_snapshot.h", | |
95 ] | |
96 | |
97 defines = [ "DISPLAY_IMPLEMENTATION" ] | |
98 | |
99 public_deps = [ | |
100 ":display", | |
101 ] | |
102 deps = [ | |
103 "//base", | |
104 "//ui/gfx", | |
105 "//ui/gfx/geometry", | |
106 ] | |
107 | |
108 if (is_chromeos) { | |
109 deps += [ "//ui/display/types" ] | |
66 } | 110 } |
67 } | 111 } |
68 | 112 |
69 if (use_ozone) { | 113 source_set("test_support") { |
70 deps += [ "//ui/ozone" ] | 114 testonly = true |
71 if (is_chromeos) { | 115 sources = [ |
72 sources -= [ | 116 "chromeos/test/action_logger.cc", |
73 "chromeos/x11/display_configurator_x11.cc", | 117 "chromeos/test/action_logger.h", |
74 "chromeos/x11/display_mode_x11.cc", | 118 "chromeos/test/action_logger_util.cc", |
75 "chromeos/x11/display_mode_x11.h", | 119 "chromeos/test/action_logger_util.h", |
76 "chromeos/x11/display_snapshot_x11.cc", | 120 "chromeos/test/test_display_layout_manager.cc", |
77 "chromeos/x11/display_snapshot_x11.h", | 121 "chromeos/test/test_display_layout_manager.h", |
78 "chromeos/x11/display_util_x11.cc", | 122 "chromeos/test/test_native_display_delegate.cc", |
79 "chromeos/x11/display_util_x11.h", | 123 "chromeos/test/test_native_display_delegate.h", |
80 "chromeos/x11/native_display_delegate_x11.cc", | 124 ] |
81 "chromeos/x11/native_display_delegate_x11.h", | 125 |
82 "chromeos/x11/native_display_event_dispatcher_x11.cc", | 126 public_deps = [ |
83 "chromeos/x11/native_display_event_dispatcher_x11.h", | 127 ":display", |
84 ] | 128 ] |
85 } | 129 deps = [ |
130 "//base", | |
131 "//ui/display/types", | |
132 "//ui/gfx", | |
133 "//ui/gfx/geometry", | |
134 ] | |
86 } | 135 } |
87 } | 136 } |
88 | 137 |
89 component("test_util") { | 138 # This test covers the ChromeOS "display" target as well as the cross-platform |
90 output_name = "display_test_util" | 139 # //display/util target. |
91 sources = [ | |
92 "chromeos/test/test_display_snapshot.cc", | |
93 "chromeos/test/test_display_snapshot.h", | |
94 ] | |
95 | |
96 defines = [ "DISPLAY_IMPLEMENTATION" ] | |
97 | |
98 public_deps = [ | |
99 ":display", | |
100 ] | |
101 deps = [ | |
102 "//base", | |
103 "//ui/gfx", | |
104 "//ui/gfx/geometry", | |
105 ] | |
106 | |
107 if (is_chromeos) { | |
108 deps += [ "//ui/display/types" ] | |
109 } | |
110 } | |
111 | |
112 source_set("test_support") { | |
113 testonly = true | |
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") { | 140 test("display_unittests") { |
137 sources = [ | 141 sources = [ |
138 "chromeos/apply_content_protection_task_unittest.cc", | 142 "chromeos/apply_content_protection_task_unittest.cc", |
139 "chromeos/configure_displays_task_unittest.cc", | 143 "chromeos/configure_displays_task_unittest.cc", |
140 "chromeos/display_configurator_unittest.cc", | 144 "chromeos/display_configurator_unittest.cc", |
141 "chromeos/query_content_protection_task_unittest.cc", | 145 "chromeos/query_content_protection_task_unittest.cc", |
142 "chromeos/update_display_configuration_task_unittest.cc", | 146 "chromeos/update_display_configuration_task_unittest.cc", |
143 "chromeos/x11/display_util_x11_unittest.cc", | 147 "chromeos/x11/display_util_x11_unittest.cc", |
144 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", | 148 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", |
145 "util/display_util_unittest.cc", | 149 "util/display_util_unittest.cc", |
146 "util/edid_parser_unittest.cc", | 150 "util/edid_parser_unittest.cc", |
147 ] | 151 ] |
148 | 152 |
149 deps = [ | 153 deps = [ |
150 ":test_util", | |
151 "//base", | 154 "//base", |
152 "//base/test:run_all_unittests", | 155 "//base/test:run_all_unittests", |
153 "//testing/gtest", | 156 "//testing/gtest", |
154 "//ui/display/util", | 157 "//ui/display/util", |
155 "//ui/gfx/geometry", | 158 "//ui/gfx/geometry", |
156 ] | 159 ] |
157 | 160 |
158 if (is_chromeos) { | 161 if (is_chromeos) { |
159 deps += [ | 162 deps += [ |
160 ":display", | 163 ":display", |
161 ":test_support", | 164 ":test_support", |
165 ":test_util", | |
162 "//base/test:test_support", | 166 "//base/test:test_support", |
163 "//ui/display/types", | 167 "//ui/display/types", |
164 ] | 168 ] |
165 } | 169 } |
166 | 170 |
167 if (use_ozone && is_chromeos) { | 171 if (use_ozone && is_chromeos) { |
168 sources -= [ | 172 sources -= [ |
169 "chromeos/x11/display_util_x11_unittest.cc", | 173 "chromeos/x11/display_util_x11_unittest.cc", |
170 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", | 174 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", |
171 ] | 175 ] |
172 } | 176 } |
173 } | 177 } |
OLD | NEW |