Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: ui/display/BUILD.gn

Issue 1825723002: Move ScreenWin to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added is_chromeos guard Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 if (is_chromeos) { 8 component("display") {
9 component("display") { 9 sources = [
10 sources = [ 10 "chromeos/apply_content_protection_task.cc",
11 "chromeos/apply_content_protection_task.cc", 11 "chromeos/apply_content_protection_task.h",
12 "chromeos/apply_content_protection_task.h", 12 "chromeos/configure_displays_task.cc",
13 "chromeos/configure_displays_task.cc", 13 "chromeos/configure_displays_task.h",
14 "chromeos/configure_displays_task.h", 14 "chromeos/display_configurator.cc",
15 "chromeos/display_configurator.cc", 15 "chromeos/display_configurator.h",
16 "chromeos/display_configurator.h", 16 "chromeos/display_layout_manager.h",
17 "chromeos/display_layout_manager.h", 17 "chromeos/display_snapshot_virtual.cc",
18 "chromeos/display_snapshot_virtual.cc", 18 "chromeos/display_snapshot_virtual.h",
19 "chromeos/display_snapshot_virtual.h", 19 "chromeos/display_util.cc",
20 "chromeos/display_util.cc", 20 "chromeos/display_util.h",
21 "chromeos/display_util.h", 21 "chromeos/ozone/display_configurator_ozone.cc",
22 "chromeos/ozone/display_configurator_ozone.cc", 22 "chromeos/query_content_protection_task.cc",
23 "chromeos/query_content_protection_task.cc", 23 "chromeos/query_content_protection_task.h",
24 "chromeos/query_content_protection_task.h", 24 "chromeos/update_display_configuration_task.cc",
25 "chromeos/update_display_configuration_task.cc", 25 "chromeos/update_display_configuration_task.h",
26 "chromeos/update_display_configuration_task.h", 26 "chromeos/x11/display_configurator_x11.cc",
27 "chromeos/x11/display_mode_x11.cc",
28 "chromeos/x11/display_mode_x11.h",
29 "chromeos/x11/display_snapshot_x11.cc",
30 "chromeos/x11/display_snapshot_x11.h",
31 "chromeos/x11/display_util_x11.cc",
32 "chromeos/x11/display_util_x11.h",
33 "chromeos/x11/native_display_delegate_x11.cc",
34 "chromeos/x11/native_display_delegate_x11.h",
35 "chromeos/x11/native_display_event_dispatcher_x11.cc",
36 "chromeos/x11/native_display_event_dispatcher_x11.h",
37 "display_export.h",
38 "display_switches.cc",
39 "display_switches.h",
40 "win/display_info.cc",
41 "win/display_info.h",
42 "win/screen_win.cc",
43 "win/screen_win.h",
44 "win/screen_win_display.cc",
45 "win/screen_win_display.h",
46 ]
47
48 defines = [ "DISPLAY_IMPLEMENTATION" ]
49
50 deps = [
51 "//base",
52 "//ui/display/types",
53 "//ui/display/util",
54 "//ui/gfx",
55 "//ui/gfx/geometry",
56 ]
57
58 if (is_chromeos && use_x11) {
59 sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ]
60 configs += [
61 "//build/config/linux:x11",
62 "//build/config/linux:xext",
63 "//build/config/linux:xi",
64 "//build/config/linux:xrandr",
65 ]
66 deps += [ "//ui/events/platform" ]
67 }
68
69 deps += []
70 if (use_x11) {
71 deps += [ "//ui/gfx/x" ]
72 }
73
74 if (is_chromeos && use_ozone) {
75 deps += [ "//ui/ozone" ]
76 sources -= [
27 "chromeos/x11/display_configurator_x11.cc", 77 "chromeos/x11/display_configurator_x11.cc",
28 "chromeos/x11/display_mode_x11.cc", 78 "chromeos/x11/display_mode_x11.cc",
29 "chromeos/x11/display_mode_x11.h", 79 "chromeos/x11/display_mode_x11.h",
30 "chromeos/x11/display_snapshot_x11.cc", 80 "chromeos/x11/display_snapshot_x11.cc",
31 "chromeos/x11/display_snapshot_x11.h", 81 "chromeos/x11/display_snapshot_x11.h",
32 "chromeos/x11/display_util_x11.cc", 82 "chromeos/x11/display_util_x11.cc",
33 "chromeos/x11/display_util_x11.h", 83 "chromeos/x11/display_util_x11.h",
34 "chromeos/x11/native_display_delegate_x11.cc", 84 "chromeos/x11/native_display_delegate_x11.cc",
35 "chromeos/x11/native_display_delegate_x11.h", 85 "chromeos/x11/native_display_delegate_x11.h",
36 "chromeos/x11/native_display_event_dispatcher_x11.cc", 86 "chromeos/x11/native_display_event_dispatcher_x11.cc",
37 "chromeos/x11/native_display_event_dispatcher_x11.h", 87 "chromeos/x11/native_display_event_dispatcher_x11.h",
38 "display_export.h",
39 "display_switches.cc",
40 "display_switches.h",
41 ] 88 ]
89 }
90 }
42 91
43 defines = [ "DISPLAY_IMPLEMENTATION" ] 92 if (is_chromeos) {
44
45 deps = [
46 "//base",
47 "//ui/display/types",
48 "//ui/display/util",
49 "//ui/gfx",
50 "//ui/gfx/geometry",
51 ]
52
53 if (use_x11) {
54 sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ]
55 configs += [
56 "//build/config/linux:x11",
57 "//build/config/linux:xext",
58 "//build/config/linux:xi",
59 "//build/config/linux:xrandr",
60 ]
61 deps += [ "//ui/events/platform" ]
62 }
63
64 deps += []
65 if (use_x11) {
66 deps += [ "//ui/gfx/x" ]
67 }
68
69 if (use_ozone) {
70 deps += [ "//ui/ozone" ]
71 sources -= [
72 "chromeos/x11/display_configurator_x11.cc",
73 "chromeos/x11/display_mode_x11.cc",
74 "chromeos/x11/display_mode_x11.h",
75 "chromeos/x11/display_snapshot_x11.cc",
76 "chromeos/x11/display_snapshot_x11.h",
77 "chromeos/x11/display_util_x11.cc",
78 "chromeos/x11/display_util_x11.h",
79 "chromeos/x11/native_display_delegate_x11.cc",
80 "chromeos/x11/native_display_delegate_x11.h",
81 "chromeos/x11/native_display_event_dispatcher_x11.cc",
82 "chromeos/x11/native_display_event_dispatcher_x11.h",
83 ]
84 }
85 }
86
87 component("test_util") { 93 component("test_util") {
88 output_name = "display_test_util" 94 output_name = "display_test_util"
89 sources = [ 95 sources = [
90 "chromeos/test/test_display_snapshot.cc", 96 "chromeos/test/test_display_snapshot.cc",
91 "chromeos/test/test_display_snapshot.h", 97 "chromeos/test/test_display_snapshot.h",
92 ] 98 ]
93 99
94 defines = [ "DISPLAY_IMPLEMENTATION" ] 100 defines = [ "DISPLAY_IMPLEMENTATION" ]
95 101
96 public_deps = [ 102 public_deps = [
97 ":display", 103 ":display",
98 ] 104 ]
99 deps = [ 105 deps = [
100 "//base", 106 "//base",
101 "//ui/display/types", 107 "//ui/display/types",
102 "//ui/gfx", 108 "//ui/gfx",
103 "//ui/gfx/geometry", 109 "//ui/gfx/geometry",
104 ] 110 ]
105 } 111 }
106
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_display_layout_manager.cc",
115 "chromeos/test/test_display_layout_manager.h",
116 "chromeos/test/test_native_display_delegate.cc",
117 "chromeos/test/test_native_display_delegate.h",
118 ]
119
120 public_deps = [
121 ":display",
122 ]
123 deps = [
124 "//base",
125 "//ui/display/types",
126 "//ui/gfx",
127 "//ui/gfx:test_support",
128 "//ui/gfx/geometry",
129 ]
130 }
131 } 112 }
132 113
133 # This test covers the ChromeOS "display" target as well as the cross-platform 114 source_set("test_support") {
134 # //display/util target. 115 testonly = true
116 sources = [
117 "chromeos/test/action_logger.cc",
118 "chromeos/test/action_logger.h",
119 "chromeos/test/action_logger_util.cc",
120 "chromeos/test/action_logger_util.h",
121 "chromeos/test/test_display_layout_manager.cc",
122 "chromeos/test/test_display_layout_manager.h",
123 "chromeos/test/test_native_display_delegate.cc",
124 "chromeos/test/test_native_display_delegate.h",
125 ]
126
127 public_deps = [
128 ":display",
129 ]
130 deps = [
131 "//base",
132 "//ui/display/types",
133 "//ui/gfx",
134 "//ui/gfx:test_support",
135 "//ui/gfx/geometry",
136 ]
137 }
138
139 # This test covers all testable components in display.
135 test("display_unittests") { 140 test("display_unittests") {
136 sources = [ 141 sources = [
137 "chromeos/apply_content_protection_task_unittest.cc", 142 "chromeos/apply_content_protection_task_unittest.cc",
138 "chromeos/configure_displays_task_unittest.cc", 143 "chromeos/configure_displays_task_unittest.cc",
139 "chromeos/display_configurator_unittest.cc", 144 "chromeos/display_configurator_unittest.cc",
140 "chromeos/query_content_protection_task_unittest.cc", 145 "chromeos/query_content_protection_task_unittest.cc",
141 "chromeos/update_display_configuration_task_unittest.cc", 146 "chromeos/update_display_configuration_task_unittest.cc",
142 "chromeos/x11/display_util_x11_unittest.cc", 147 "chromeos/x11/display_util_x11_unittest.cc",
143 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", 148 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
144 "util/display_util_unittest.cc", 149 "util/display_util_unittest.cc",
145 "util/edid_parser_unittest.cc", 150 "util/edid_parser_unittest.cc",
151 "win/screen_win_unittest.cc",
146 ] 152 ]
147 153
148 deps = [ 154 deps = [
155 ":display",
149 "//base", 156 "//base",
150 "//base/test:run_all_unittests", 157 "//base/test:run_all_unittests",
158 "//base/test:test_support",
151 "//testing/gtest", 159 "//testing/gtest",
160 "//ui/display/types",
152 "//ui/display/util", 161 "//ui/display/util",
162 "//ui/gfx:test_support",
153 "//ui/gfx/geometry", 163 "//ui/gfx/geometry",
154 ] 164 ]
155 165
156 if (is_chromeos) { 166 if (is_chromeos) {
157 deps += [ 167 deps += [
158 ":display",
159 ":test_support", 168 ":test_support",
160 ":test_util", 169 ":test_util",
161 "//base/test:test_support",
162 "//ui/display/types",
163 ] 170 ]
164 } 171 }
165 172
166 if (use_ozone && is_chromeos) { 173 if (is_chromeos && use_ozone) {
167 sources -= [ 174 sources -= [
168 "chromeos/x11/display_util_x11_unittest.cc", 175 "chromeos/x11/display_util_x11_unittest.cc",
169 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", 176 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
170 ] 177 ]
171 } 178 }
172 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698