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