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", 53 "window_observer.h", 54 "window_targeter.cc", 55 "window_targeter.h", 56 "window_tracker.cc", 57 "window_tracker.h", 58 "window_tree_host.cc", 59 "window_tree_host.h", 60 "window_tree_host_mac.mm", 61 "window_tree_host_mac.h", 62 "window_tree_host_observer.h", 63 "window_tree_host_win.cc", 64 "window_tree_host_win.h", 65 "window_tree_host_x11.cc", 66 "window_tree_host_x11.h", 67 "../wm/public/activation_change_observer.h", 68 "../wm/public/activation_change_observer.cc", 69 "../wm/public/activation_client.cc", 70 "../wm/public/activation_client.h", 71 "../wm/public/activation_delegate.cc", 72 "../wm/public/activation_delegate.h", 73 "../wm/public/animation_host.cc", 74 "../wm/public/animation_host.h", 75 "../wm/public/dispatcher_client.cc", 76 "../wm/public/dispatcher_client.h", 77 "../wm/public/drag_drop_client.cc", 78 "../wm/public/drag_drop_client.h", 79 "../wm/public/drag_drop_delegate.cc", 80 "../wm/public/drag_drop_delegate.h", 81 "../wm/public/scoped_tooltip_disabler.cc", 82 "../wm/public/scoped_tooltip_disabler.h", 83 "../wm/public/tooltip_client.cc", 84 "../wm/public/tooltip_client.h", 85 "../wm/public/transient_window_client.cc", 86 "../wm/public/transient_window_client.h", 87 "../wm/public/window_move_client.cc", 88 "../wm/public/window_move_client.h", 89 ] 90 91 defines = [ 92 "AURA_IMPLEMENTATION", 93 ] 94 95 deps = [ 96 "//base", 97 "//base:i18n", 98 "//base/third_party/dynamic_annotations", 99 "//skia", 100 "//ui/base", 101 "//ui/compositor", 102 "//ui/events", 103 "//ui/events/platform", 104 "//ui/gfx", 105 "//ui/gfx/geometry", 106 ] 107 108 if (use_x11) { 109 configs += [ 110 "//build/config/linux:x11", 111 "//build/config/linux:xrandr", 112 ] 113 deps += [ 114 "//ui/events/platform/x11", 115 ] 116 } 117 118 if (is_win) { 119 sources -= [ 120 "input_state_lookup.cc", 121 ] 122 123 deps += [ 124 "//ui/metro_viewer", 125 "//ipc", 126 ] 127 } 128 129 if (use_ozone) { 130 sources += [ 131 "window_tree_host_ozone.cc", 132 "window_tree_host_ozone.h", 133 ] 134 135 # TODO(GYP) enable when these targets exist. 136 #deps += [ 137 # "//ui/events/ozone", 138 # "//ui/ozone", 139 #] 140 } 141 } 142 143 source_set("aura_test_support") { 144 sources = [ 145 "test/aura_test_base.cc", 146 "test/aura_test_base.h", 147 "test/aura_test_helper.cc", 148 "test/aura_test_helper.h", 149 "test/aura_test_utils.cc", 150 "test/aura_test_utils.h", 151 "test/env_test_helper.h", 152 "test/event_generator.cc", 153 "test/event_generator.h", 154 "test/test_cursor_client.cc", 155 "test/test_cursor_client.h", 156 "test/test_focus_client.cc", 157 "test/test_focus_client.h", 158 "test/test_screen.cc", 159 "test/test_screen.h", 160 "test/test_window_tree_client.cc", 161 "test/test_window_tree_client.h", 162 "test/test_windows.cc", 163 "test/test_windows.h", 164 "test/test_window_delegate.cc", 165 "test/test_window_delegate.h", 166 "test/ui_controls_factory_aura.h", 167 "test/window_test_api.cc", 168 "test/window_test_api.h", 169 ] 170 171 deps = [ 172 ":aura", 173 "//skia", 174 "//testing/gtest", 175 "//ui/base", 176 "//ui/base:ui_base_test_support", 177 "//ui/compositor:test_support", 178 "//ui/events", 179 "//ui/events:events_base", 180 "//ui/events:events_test_support", 181 "//ui/gfx", 182 "//ui/gfx/geometry", 183 ] 184 185 if (is_win) { 186 cflags = [ 187 "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 188 ] 189 } 190 191 if (use_aura) { 192 if (is_win) { 193 sources += [ 194 "test/ui_controls_factory_aurawin.cc", 195 ] 196 } 197 198 if (use_x11) { 199 sources += [ 200 "test/ui_controls_factory_aurax11.cc", 201 ] 202 } 203 } 204 } 205 206 #TODO(GYP): Enable this when everything it depends links. 207 #executable("aura_demo") { 208 # sources = [ 209 # "demo/demo_main.cc", 210 # ] 211 # 212 # deps = [ 213 # ":aura", 214 # ":aura_test_support", 215 # "//base", 216 # "//base:i18n", 217 # "//skia", 218 # "//third_party/icu", 219 # "//ui/base", 220 # "//ui/compositor", 221 # "//ui/compositor:test_support", 222 # "//ui/events", 223 # "//ui/gfx", 224 # "//ui/gfx/geometry", 225 # ] 226 # 227 # if (use_x11) { 228 # deps += [ 229 # "//ui/gfx/x", 230 # ] 231 # } 232 #} 233 234 #TODO(GYP): Enable this when everything it depends links. 235 #executable("aura_bench") { 236 # sources = [ 237 # "bench/bench_main.cc", 238 # ] 239 # 240 # deps = [ 241 # ":aura", 242 # ":aura_test_support", 243 # "//base", 244 # "//base:i18n", 245 # "//cc", 246 # "//skia", 247 # "//third_party/icu", 248 # "//ui/base", 249 # "//ui/compositor", 250 # "//ui/compositor:test_support", 251 # "//ui/events", 252 # "//ui/gfx", 253 # "//ui/gfx/geometry", 254 # ] 255 # 256 # if (use_x11) { 257 # deps += [ 258 # "//ui/gfx/x", 259 # ] 260 # } 261 #} 262 263 #TODO(GYP): Enable this when everything it depends links. 264 #test("aura_unittests") { 265 # sources = [ 266 # "gestures/gesture_recognizer_unittest.cc", 267 # "test/run_all_unittests.cc", 268 # "window_event_dispatcher_unittest.cc", 269 # "window_targeter_unittest.cc", 270 # "window_unittest.cc", 271 # ] 272 # 273 # deps = [ 274 # ":aura", 275 # ":aura_test_support", 276 # "//base/test:test_support", 277 # "//skia", 278 # "//testing/gtest", 279 # "//ui/base", 280 # "//ui/base:ui_base_test_support", 281 # "//ui/compositor", 282 # "//ui/compositor:test_support", 283 # "//ui/events", 284 # "//ui/events:events_base", 285 # "//ui/events:gesture_detection", 286 # "//ui/gfx", 287 # "//ui/gfx/geometry", 288 # "//ui/gl", 289 # ] 290 # 291 # if (is_linux) { 292 # deps += [ 293 # #"<(DEPTH)/third_party/mesa/mesa.gyp:osmesa", 294 # ] 295 # } 296 # 297 # if (is_linux) { # && use_allocator != "none") { 298 # deps += [ 299 # # See http://crbug.com/162998#c4 for why this is needed. 300 # "//base/allocator", 301 # ] 302 # } 303 #} 304