tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 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. |
| 4 | |
scottmg | bba95ce | 2014-12-03 07:28:23 | [diff] [blame] | 5 | import("//build/config/ui.gni") |
qsr | fb5251d1 | 2015-01-21 15:57:22 | [diff] [blame] | 6 | import("//testing/test.gni") |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 7 | |
| 8 | component("aura") { |
| 9 | sources = [ |
satorux | d3ce5e2 | 2015-02-18 01:01:42 | [diff] [blame] | 10 | "../wm/public/activation_change_observer.cc", |
| 11 | "../wm/public/activation_change_observer.h", |
| 12 | "../wm/public/activation_client.cc", |
| 13 | "../wm/public/activation_client.h", |
| 14 | "../wm/public/activation_delegate.cc", |
| 15 | "../wm/public/activation_delegate.h", |
| 16 | "../wm/public/animation_host.cc", |
| 17 | "../wm/public/animation_host.h", |
| 18 | "../wm/public/dispatcher_client.cc", |
| 19 | "../wm/public/dispatcher_client.h", |
| 20 | "../wm/public/drag_drop_client.cc", |
| 21 | "../wm/public/drag_drop_client.h", |
| 22 | "../wm/public/drag_drop_delegate.cc", |
| 23 | "../wm/public/drag_drop_delegate.h", |
ginkage | e8d7032 | 2015-03-13 21:20:59 | [diff] [blame] | 24 | "../wm/public/scoped_drag_drop_disabler.cc", |
| 25 | "../wm/public/scoped_drag_drop_disabler.h", |
satorux | d3ce5e2 | 2015-02-18 01:01:42 | [diff] [blame] | 26 | "../wm/public/scoped_tooltip_disabler.cc", |
| 27 | "../wm/public/scoped_tooltip_disabler.h", |
| 28 | "../wm/public/tooltip_client.cc", |
| 29 | "../wm/public/tooltip_client.h", |
| 30 | "../wm/public/transient_window_client.cc", |
| 31 | "../wm/public/transient_window_client.h", |
| 32 | "../wm/public/window_move_client.cc", |
| 33 | "../wm/public/window_move_client.h", |
| 34 | "../wm/public/window_types.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 35 | "client/aura_constants.cc", |
| 36 | "client/aura_constants.h", |
| 37 | "client/capture_client.cc", |
| 38 | "client/capture_client.h", |
| 39 | "client/capture_delegate.h", |
| 40 | "client/cursor_client.cc", |
| 41 | "client/cursor_client.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 42 | "client/cursor_client_observer.cc", |
satorux | d3ce5e2 | 2015-02-18 01:01:42 | [diff] [blame] | 43 | "client/cursor_client_observer.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 44 | "client/default_capture_client.cc", |
| 45 | "client/default_capture_client.h", |
| 46 | "client/event_client.cc", |
| 47 | "client/event_client.h", |
| 48 | "client/focus_change_observer.cc", |
| 49 | "client/focus_change_observer.h", |
| 50 | "client/focus_client.cc", |
| 51 | "client/focus_client.h", |
| 52 | "client/screen_position_client.cc", |
| 53 | "client/screen_position_client.h", |
| 54 | "client/visibility_client.cc", |
| 55 | "client/visibility_client.h", |
| 56 | "client/window_stacking_client.cc", |
| 57 | "client/window_stacking_client.h", |
| 58 | "client/window_tree_client.cc", |
| 59 | "client/window_tree_client.h", |
| 60 | "env.cc", |
| 61 | "env.h", |
| 62 | "env_observer.h", |
| 63 | "input_state_lookup.cc", |
| 64 | "input_state_lookup.h", |
| 65 | "input_state_lookup_win.cc", |
| 66 | "input_state_lookup_win.h", |
| 67 | "layout_manager.cc", |
| 68 | "layout_manager.h", |
| 69 | "remote_window_tree_host_win.cc", |
| 70 | "remote_window_tree_host_win.h", |
| 71 | "scoped_window_targeter.cc", |
| 72 | "scoped_window_targeter.h", |
| 73 | "window.cc", |
| 74 | "window.h", |
satorux | d3ce5e2 | 2015-02-18 01:01:42 | [diff] [blame] | 75 | "window_delegate.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 76 | "window_event_dispatcher.cc", |
| 77 | "window_event_dispatcher.h", |
tfarina@chromium.org | d75308f | 2014-07-03 17:30:28 | [diff] [blame] | 78 | "window_observer.cc", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 79 | "window_observer.h", |
| 80 | "window_targeter.cc", |
| 81 | "window_targeter.h", |
| 82 | "window_tracker.cc", |
| 83 | "window_tracker.h", |
| 84 | "window_tree_host.cc", |
| 85 | "window_tree_host.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 86 | "window_tree_host_mac.h", |
satorux | d3ce5e2 | 2015-02-18 01:01:42 | [diff] [blame] | 87 | "window_tree_host_mac.mm", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 88 | "window_tree_host_observer.h", |
sievers | 1b4ef1a6 | 2015-10-16 20:44:36 | [diff] [blame^] | 89 | "window_tree_host_platform.cc", |
| 90 | "window_tree_host_platform.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 91 | "window_tree_host_x11.cc", |
| 92 | "window_tree_host_x11.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 93 | ] |
| 94 | |
scottmg | bba95ce | 2014-12-03 07:28:23 | [diff] [blame] | 95 | defines = [ "AURA_IMPLEMENTATION" ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 96 | |
| 97 | deps = [ |
| 98 | "//base", |
| 99 | "//base:i18n", |
| 100 | "//base/third_party/dynamic_annotations", |
| 101 | "//skia", |
| 102 | "//ui/base", |
spang | 1c36fac | 2015-02-05 19:55:12 | [diff] [blame] | 103 | "//ui/base/ime", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 104 | "//ui/compositor", |
| 105 | "//ui/events", |
brettw | 44a5cf8 | 2015-04-08 19:48:22 | [diff] [blame] | 106 | "//ui/events:events_base", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 107 | "//ui/events/platform", |
| 108 | "//ui/gfx", |
| 109 | "//ui/gfx/geometry", |
| 110 | ] |
| 111 | |
| 112 | if (use_x11) { |
| 113 | configs += [ |
| 114 | "//build/config/linux:x11", |
| 115 | "//build/config/linux:xrandr", |
| 116 | ] |
jamesr | 4359db7 | 2015-01-21 12:40:00 | [diff] [blame] | 117 | deps += [ |
| 118 | "//ui/events:events_base", |
| 119 | "//ui/events/devices", |
| 120 | "//ui/events/platform/x11", |
| 121 | "//ui/gfx/x", |
| 122 | ] |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 123 | } else { |
| 124 | sources -= [ |
| 125 | "window_tree_host_x11.cc", |
| 126 | "window_tree_host_x11.h", |
| 127 | ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | if (is_win) { |
scottmg | bba95ce | 2014-12-03 07:28:23 | [diff] [blame] | 131 | sources -= [ "input_state_lookup.cc" ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 132 | |
brettw@chromium.org | b2f44d1 | 2014-06-10 17:48:03 | [diff] [blame] | 133 | deps += [ |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 134 | "//ipc", |
vchigrin | ac0495771 | 2014-12-21 16:47:40 | [diff] [blame] | 135 | "//ui/metro_viewer", |
brettw | a22cb3b | 2015-04-30 20:23:12 | [diff] [blame] | 136 | "//ui/platform_window/win", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 137 | ] |
| 138 | } |
| 139 | |
sievers | 1b4ef1a6 | 2015-10-16 20:44:36 | [diff] [blame^] | 140 | if (!is_win && !is_android && !use_ozone) { |
| 141 | sources -= [ |
| 142 | "window_tree_host_platform.cc", |
| 143 | "window_tree_host_platform.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 144 | ] |
sievers | 1b4ef1a6 | 2015-10-16 20:44:36 | [diff] [blame^] | 145 | } |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 146 | |
sievers | 1b4ef1a6 | 2015-10-16 20:44:36 | [diff] [blame^] | 147 | if (use_ozone) { |
scottmg | bba95ce | 2014-12-03 07:28:23 | [diff] [blame] | 148 | deps += [ "//ui/ozone" ] |
sievers | 1b4ef1a6 | 2015-10-16 20:44:36 | [diff] [blame^] | 149 | } |
| 150 | |
| 151 | if (is_android) { |
| 152 | deps += [ |
| 153 | "//ui/platform_window/android", |
| 154 | "//ui/platform_window/android:platform_window_java", |
| 155 | ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 156 | } |
| 157 | } |
| 158 | |
brettw@chromium.org | 604828c | 2014-07-02 20:39:12 | [diff] [blame] | 159 | source_set("test_support") { |
Brett Wilson | 8f80ad0b | 2014-09-08 19:50:24 | [diff] [blame] | 160 | testonly = true |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 161 | sources = [ |
| 162 | "test/aura_test_base.cc", |
| 163 | "test/aura_test_base.h", |
| 164 | "test/aura_test_helper.cc", |
| 165 | "test/aura_test_helper.h", |
| 166 | "test/aura_test_utils.cc", |
| 167 | "test/aura_test_utils.h", |
| 168 | "test/env_test_helper.h", |
tapted@chromium.org | 73c9fd0 | 2014-07-28 01:48:52 | [diff] [blame] | 169 | "test/event_generator_delegate_aura.cc", |
| 170 | "test/event_generator_delegate_aura.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 171 | "test/test_cursor_client.cc", |
| 172 | "test/test_cursor_client.h", |
| 173 | "test/test_focus_client.cc", |
| 174 | "test/test_focus_client.h", |
| 175 | "test/test_screen.cc", |
| 176 | "test/test_screen.h", |
satorux | d3ce5e2 | 2015-02-18 01:01:42 | [diff] [blame] | 177 | "test/test_window_delegate.cc", |
| 178 | "test/test_window_delegate.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 179 | "test/test_window_tree_client.cc", |
| 180 | "test/test_window_tree_client.h", |
| 181 | "test/test_windows.cc", |
| 182 | "test/test_windows.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 183 | "test/ui_controls_factory_aura.h", |
mfomitchev@chromium.org | 6b614747 | 2014-06-27 17:37:07 | [diff] [blame] | 184 | "test/window_event_dispatcher_test_api.cc", |
| 185 | "test/window_event_dispatcher_test_api.h", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 186 | "test/window_test_api.cc", |
| 187 | "test/window_test_api.h", |
| 188 | ] |
| 189 | |
brettw | d1c719a | 2015-02-19 23:17:04 | [diff] [blame] | 190 | # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 191 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 192 | |
Brett Wilson | 0380637c | 2014-09-19 21:24:40 | [diff] [blame] | 193 | public_deps = [ |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 194 | ":aura", |
Brett Wilson | 0380637c | 2014-09-19 21:24:40 | [diff] [blame] | 195 | ] |
| 196 | deps = [ |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 197 | "//skia", |
| 198 | "//testing/gtest", |
tfarina@chromium.org | e54a1f52 | 2014-07-22 23:26:48 | [diff] [blame] | 199 | "//ui/base:test_support", |
tfarina | eb2372f | 2015-03-10 16:07:59 | [diff] [blame] | 200 | "//ui/base/ime", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 201 | "//ui/compositor:test_support", |
| 202 | "//ui/events", |
| 203 | "//ui/events:events_base", |
tfarina@chromium.org | e54a1f52 | 2014-07-22 23:26:48 | [diff] [blame] | 204 | "//ui/events:test_support", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 205 | "//ui/gfx", |
| 206 | "//ui/gfx/geometry", |
brettw | a78fded | 2014-09-07 00:27:41 | [diff] [blame] | 207 | "//ui/wm", |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 208 | ] |
| 209 | |
| 210 | if (is_win) { |
tfarina | ca865e8 | 2014-12-19 00:50:44 | [diff] [blame] | 211 | sources += [ "test/ui_controls_factory_aurawin.cc" ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 212 | } |
| 213 | |
vchigrin | f06c5c8 | 2014-12-17 01:23:39 | [diff] [blame] | 214 | if (use_x11) { |
tfarina | ca865e8 | 2014-12-19 00:50:44 | [diff] [blame] | 215 | sources += [ |
| 216 | "test/ui_controls_factory_aurax11.cc", |
| 217 | "test/x11_event_sender.cc", |
| 218 | "test/x11_event_sender.h", |
| 219 | ] |
| 220 | |
vchigrin | f06c5c8 | 2014-12-17 01:23:39 | [diff] [blame] | 221 | deps += [ "//ui/gfx/x" ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 222 | } |
spang | 6f171ac | 2015-02-04 18:46:22 | [diff] [blame] | 223 | |
| 224 | if (use_ozone) { |
| 225 | sources += [ "test/ui_controls_factory_ozone.cc" ] |
| 226 | } |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 227 | } |
| 228 | |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 229 | executable("demo") { |
| 230 | output_name = "aura_demo" |
Brett Wilson | 8f80ad0b | 2014-09-08 19:50:24 | [diff] [blame] | 231 | testonly = true |
| 232 | |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 233 | sources = [ |
| 234 | "demo/demo_main.cc", |
| 235 | ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 236 | |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 237 | deps = [ |
| 238 | ":aura", |
| 239 | ":test_support", |
| 240 | "//base", |
brettw | ba7a73d | 2015-08-31 22:17:39 | [diff] [blame] | 241 | "//build/config/sanitizers:deps", |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 242 | "//base:i18n", |
| 243 | "//skia", |
| 244 | "//third_party/icu", |
| 245 | "//ui/base", |
| 246 | "//ui/compositor", |
| 247 | "//ui/compositor:test_support", |
| 248 | "//ui/events", |
| 249 | "//ui/gfx", |
| 250 | "//ui/gfx/geometry", |
Brett Wilson | 5e4c24b9 | 2014-08-28 19:34:11 | [diff] [blame] | 251 | "//ui/gl", |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 252 | ] |
tfarina@chromium.org | bd56a5b | 2014-06-07 04:09:29 | [diff] [blame] | 253 | |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 254 | if (use_x11) { |
scottmg | bba95ce | 2014-12-03 07:28:23 | [diff] [blame] | 255 | deps += [ "//ui/gfx/x" ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 256 | } |
| 257 | } |
| 258 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 259 | executable("bench") { |
| 260 | output_name = "aura_bench" |
| 261 | testonly = true |
Brett Wilson | 8f80ad0b | 2014-09-08 19:50:24 | [diff] [blame] | 262 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 263 | sources = [ |
| 264 | "bench/bench_main.cc", |
| 265 | ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 266 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 267 | deps = [ |
| 268 | ":test_support", |
| 269 | "//base", |
| 270 | "//base:i18n", |
brettw | ba7a73d | 2015-08-31 22:17:39 | [diff] [blame] | 271 | "//build/config/sanitizers:deps", |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 272 | "//cc", |
| 273 | "//gpu/command_buffer/client:gles2_interface", |
| 274 | "//skia", |
| 275 | "//third_party/icu", |
| 276 | "//ui/base", |
| 277 | "//ui/compositor", |
| 278 | "//ui/compositor:test_support", |
| 279 | "//ui/events", |
| 280 | "//ui/gfx", |
| 281 | "//ui/gfx/geometry", |
| 282 | "//ui/gl", |
| 283 | ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 284 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 285 | if (use_x11) { |
| 286 | deps += [ "//ui/gfx/x" ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 287 | } |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 288 | } |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 289 | |
dpranke | a21b31b0 | 2015-07-24 21:42:00 | [diff] [blame] | 290 | # TODO(GYP): Delete this after we've converted everything to GN. |
| 291 | # The _run targets exist only for compatibility w/ GYP. |
| 292 | group("aura_unittests_run") { |
| 293 | testonly = true |
| 294 | deps = [ |
| 295 | ":aura_unittests", |
| 296 | ] |
| 297 | } |
| 298 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 299 | test("aura_unittests") { |
| 300 | sources = [ |
| 301 | "gestures/gesture_recognizer_unittest.cc", |
| 302 | "test/run_all_unittests.cc", |
| 303 | "window_event_dispatcher_unittest.cc", |
| 304 | "window_targeter_unittest.cc", |
| 305 | "window_unittest.cc", |
| 306 | ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 307 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 308 | deps = [ |
| 309 | ":test_support", |
| 310 | "//base/allocator", |
| 311 | "//base/test:test_support", |
| 312 | "//skia", |
| 313 | "//testing/gtest", |
| 314 | "//ui/base:test_support", |
| 315 | "//ui/compositor:test_support", |
| 316 | "//ui/events:test_support", |
| 317 | "//ui/events:gesture_detection", |
| 318 | "//ui/gfx", |
| 319 | "//ui/gfx/geometry", |
| 320 | "//ui/gl", |
| 321 | ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 322 | |
brettw | 4897a61 | 2015-03-02 23:13:15 | [diff] [blame] | 323 | if (is_linux) { |
| 324 | deps += [ "//third_party/mesa" ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 325 | } |
dpranke | a21b31b0 | 2015-07-24 21:42:00 | [diff] [blame] | 326 | |
sievers | 1b4ef1a6 | 2015-10-16 20:44:36 | [diff] [blame^] | 327 | data_deps = [ |
| 328 | "//third_party/mesa:osmesa", |
| 329 | ] |
tfarina@chromium.org | c7a5f27 | 2014-08-15 00:19:00 | [diff] [blame] | 330 | } |