# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/jumbo.gni") import("//build/config/ui.gni") import("//testing/test.gni") jumbo_component("aura") { public = [ "client/aura_constants.h", "client/capture_client.h", "client/capture_client_observer.h", "client/capture_delegate.h", "client/cursor_client.h", "client/cursor_client_observer.h", "client/default_capture_client.h", "client/drag_drop_client.h", "client/drag_drop_client_observer.h", "client/drag_drop_delegate.h", "client/event_client.h", "client/focus_change_observer.h", "client/focus_client.h", "client/screen_position_client.h", "client/transient_window_client.h", "client/transient_window_client_observer.h", "client/visibility_client.h", "client/window_parenting_client.h", "client/window_stacking_client.h", "client/window_types.h", "env.h", "env_input_state_controller.h", "env_observer.h", "event_injector.h", "input_state_lookup.h", "layout_manager.h", "null_window_targeter.h", "scoped_enable_unadjusted_mouse_events.h", "scoped_keyboard_hook.h", "scoped_simple_keyboard_hook.h", "scoped_window_event_targeting_blocker.h", "scoped_window_targeter.h", "window.h", "window_delegate.h", "window_event_dispatcher.h", "window_event_dispatcher_observer.h", "window_observer.h", "window_occlusion_change_builder.h", "window_occlusion_tracker.h", "window_targeter.h", "window_tracker.h", "window_tree_host.h", "window_tree_host_observer.h", "window_tree_host_platform.h", ] sources = [ "aura_export.h", "client/aura_constants.cc", "client/capture_client.cc", "client/cursor_client.cc", "client/cursor_client_observer.cc", "client/default_capture_client.cc", "client/drag_drop_client.cc", "client/drag_drop_delegate.cc", "client/event_client.cc", "client/focus_change_observer.cc", "client/focus_client.cc", "client/screen_position_client.cc", "client/transient_window_client.cc", "client/visibility_client.cc", "client/window_parenting_client.cc", "client/window_stacking_client.cc", "env.cc", "env_input_state_controller.cc", "event_injector.cc", "input_state_lookup.cc", "layout_manager.cc", "native_window_occlusion_tracker.cc", "native_window_occlusion_tracker.h", "null_window_targeter.cc", "scoped_keyboard_hook.cc", "scoped_simple_keyboard_hook.cc", "scoped_window_event_targeting_blocker.cc", "scoped_window_targeter.cc", "window.cc", "window_delegate.cc", "window_event_dispatcher.cc", "window_observer.cc", "window_occlusion_change_builder.cc", "window_occlusion_tracker.cc", "window_targeter.cc", "window_tracker.cc", "window_tree_host.cc", "window_tree_host_platform.cc", ] friend = [ ":*" ] defines = [ "AURA_IMPLEMENTATION" ] deps = [ "//base", "//base:i18n", "//base/third_party/dynamic_annotations", "//cc", "//cc/mojo_embedder", "//components/discardable_memory/client", "//components/discardable_memory/public/mojom", "//components/viz/client", "//components/viz/common", "//components/viz/host", "//gpu/ipc/client", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", "//skia", "//ui/base", "//ui/base/clipboard", "//ui/base/cursor/mojom:cursor_type", "//ui/base/ime/init", "//ui/display", "//ui/events", "//ui/events:dom_keyboard_layout", "//ui/events:events_base", "//ui/events/platform", "//ui/gfx", "//ui/gfx:gfx_switches", "//ui/gfx/geometry", "//ui/gl", "//ui/platform_window", "//ui/platform_window/stub", ] public_deps = [ "//ui/base/cursor:cursor_base", "//ui/base/dragdrop/mojom:mojom_headers", "//ui/base/ime", "//ui/compositor", ] if (is_win) { public += [ "input_state_lookup_win.h" ] sources += [ "input_state_lookup_win.cc", "native_window_occlusion_tracker_win.cc", "native_window_occlusion_tracker_win.h", ] } if (use_x11) { public_deps += [ "//ui/base/x" ] deps += [ "//ui/events/platform/x11", "//ui/platform_window/x11", ] } if (is_win) { sources -= [ "input_state_lookup.cc" ] deps += [ "//ipc", "//ui/base/cursor", "//ui/platform_window/win", ] } if (is_win) { libs = [ "wtsapi32.lib", "dwmapi.lib", ] } if (use_ozone) { deps += [ "//ui/ozone" ] public += [ "screen_ozone.h" ] sources += [ "screen_ozone.cc" ] } configs += [ "//build/config/compiler:noshadowing" ] } jumbo_static_library("test_support") { testonly = true sources = [ "test/aura_test_base.cc", "test/aura_test_base.h", "test/aura_test_helper.cc", "test/aura_test_helper.h", "test/aura_test_utils.cc", "test/aura_test_utils.h", "test/default_event_generator_delegate.cc", "test/default_event_generator_delegate.h", "test/env_test_helper.h", "test/event_generator_delegate_aura.cc", "test/event_generator_delegate_aura.h", "test/test_cursor_client.cc", "test/test_cursor_client.h", "test/test_focus_client.cc", "test/test_focus_client.h", "test/test_screen.cc", "test/test_screen.h", "test/test_window_delegate.cc", "test/test_window_delegate.h", "test/test_window_parenting_client.cc", "test/test_window_parenting_client.h", "test/test_window_targeter.cc", "test/test_window_targeter.h", "test/test_windows.cc", "test/test_windows.h", "test/ui_controls_factory_aura.h", "test/window_event_dispatcher_test_api.cc", "test/window_event_dispatcher_test_api.h", "test/window_occlusion_tracker_test_api.cc", "test/window_occlusion_tracker_test_api.h", "test/window_test_api.cc", "test/window_test_api.h", ] # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] public_deps = [ ":aura", # Must be public as headers include buildflags.h. "//ui/base:buildflags", ] deps = [ "//base", "//base/test:test_support", "//cc:test_support", "//components/viz/test:test_support", "//skia", "//testing/gtest", "//ui/base:test_support", "//ui/base/cursor:cursor_base", "//ui/base/cursor/mojom:cursor_type", "//ui/base/ime/init", "//ui/compositor:test_support", "//ui/display", "//ui/display/manager", "//ui/events", "//ui/events:events_base", "//ui/events:test_support", "//ui/gfx", "//ui/gfx/geometry", "//ui/platform_window", "//ui/wm", ] if (is_win) { sources += [ "test/ui_controls_factory_aurawin.cc" ] } if (is_linux || is_chromeos) { sources += [ "test/ui_controls_factory_aura_linux.cc" ] } if (use_x11) { sources += [ "test/ui_controls_aurax11.cc", "test/ui_controls_aurax11.h", "test/x11_event_sender.h", ] deps += [ "//ui/events/platform/x11", "//ui/gfx/x", ] } if (use_ozone) { if (is_fuchsia) { deps += [ "//ui/ozone" ] } sources += [ "test/ui_controls_ozone.cc", "test/ui_controls_ozone.h", ] } if (is_linux || is_chromeos) { deps += [ "//ui/platform_window/common" ] } } executable("aura_demo") { testonly = true sources = [ "demo/demo_main.cc" ] deps = [ ":aura", ":test_support", "//base", "//base:i18n", "//build/win:default_exe_manifest", "//components/viz/host", "//components/viz/service", "//mojo/core/embedder", "//skia", "//third_party/icu", "//ui/base", "//ui/base/ime/init", "//ui/compositor", "//ui/compositor:test_support", "//ui/display", "//ui/events", "//ui/gfx", "//ui/gfx/geometry", "//ui/gl", "//ui/gl/init", ] if (use_x11) { deps += [ "//ui/gfx/x" ] } } test("aura_unittests") { use_xvfb = use_xvfb_in_this_config sources = [ "../compositor_extra/shadow_unittest.cc", "client/screen_position_client_unittest.cc", "gestures/gesture_recognizer_unittest.cc", "test/aura_test_suite.h", "test/run_all_unittests.cc", "window_event_dispatcher_unittest.cc", "window_occlusion_change_builder_unittest.cc", "window_occlusion_tracker_unittest.cc", "window_targeter_unittest.cc", "window_tree_host_platform_unittest.cc", "window_tree_host_unittest.cc", "window_unittest.cc", ] if (is_win) { sources += [ "native_window_occlusion_tracker_unittest.cc" ] libs = [ "dwmapi.lib" ] } deps = [ ":test_support", "//base/test:test_support", "//cc/mojo_embedder", "//components/viz/client", "//mojo/core/embedder", "//skia", "//testing/gtest", "//ui/aura_extra", "//ui/aura_extra:tests", "//ui/base:test_support", "//ui/base/clipboard:clipboard_types", "//ui/compositor:test_support", "//ui/compositor_extra", "//ui/display:test_support", "//ui/events:gesture_detection", "//ui/events:test_support", "//ui/gfx", "//ui/gfx/geometry", "//ui/gl:test_support", "//ui/platform_window", "//ui/platform_window/stub", "//ui/wm", ] if (use_ozone) { deps += [ "//ui/ozone" ] } data_deps = [ "//third_party/mesa_headers" ] } # This target is added as a dependency of browser interactive_ui_tests. It must # be source_set, otherwise the linker will drop the tests as dead code. source_set("aura_interactive_ui_tests") { testonly = true if (is_win) { sources = [ "native_window_occlusion_tracker_win_interactive_test.cc" ] deps = [ ":aura", ":test_support", "//base/test:test_support", "//mojo/core/embedder", "//testing/gtest", "//ui/base/ime/init", "//ui/display:display", "//ui/gfx", "//ui/gfx/geometry", "//ui/gl:test_support", "//ui/gl/init", "//ui/views:views", ] } }