| # 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/ui.gni") |
| import("//testing/test.gni") |
| |
| component("aura") { |
| sources = [ |
| "../wm/public/activation_change_observer.cc", |
| "../wm/public/activation_change_observer.h", |
| "../wm/public/activation_client.cc", |
| "../wm/public/activation_client.h", |
| "../wm/public/activation_delegate.cc", |
| "../wm/public/activation_delegate.h", |
| "../wm/public/animation_host.cc", |
| "../wm/public/animation_host.h", |
| "../wm/public/drag_drop_client.cc", |
| "../wm/public/drag_drop_client.h", |
| "../wm/public/drag_drop_delegate.cc", |
| "../wm/public/drag_drop_delegate.h", |
| "../wm/public/scoped_drag_drop_disabler.cc", |
| "../wm/public/scoped_drag_drop_disabler.h", |
| "../wm/public/scoped_tooltip_disabler.cc", |
| "../wm/public/scoped_tooltip_disabler.h", |
| "../wm/public/tooltip_client.cc", |
| "../wm/public/tooltip_client.h", |
| "../wm/public/transient_window_client.cc", |
| "../wm/public/transient_window_client.h", |
| "../wm/public/window_move_client.cc", |
| "../wm/public/window_move_client.h", |
| "../wm/public/window_types.h", |
| "client/aura_constants.cc", |
| "client/aura_constants.h", |
| "client/capture_client.cc", |
| "client/capture_client.h", |
| "client/capture_client_observer.h", |
| "client/capture_delegate.h", |
| "client/cursor_client.cc", |
| "client/cursor_client.h", |
| "client/cursor_client_observer.cc", |
| "client/cursor_client_observer.h", |
| "client/default_capture_client.cc", |
| "client/default_capture_client.h", |
| "client/event_client.cc", |
| "client/event_client.h", |
| "client/focus_change_observer.cc", |
| "client/focus_change_observer.h", |
| "client/focus_client.cc", |
| "client/focus_client.h", |
| "client/screen_position_client.cc", |
| "client/screen_position_client.h", |
| "client/visibility_client.cc", |
| "client/visibility_client.h", |
| "client/window_parenting_client.cc", |
| "client/window_parenting_client.h", |
| "client/window_stacking_client.cc", |
| "client/window_stacking_client.h", |
| "env.cc", |
| "env.h", |
| "env_input_state_controller.cc", |
| "env_input_state_controller.h", |
| "env_observer.h", |
| "input_state_lookup.cc", |
| "input_state_lookup.h", |
| "input_state_lookup_win.cc", |
| "input_state_lookup_win.h", |
| "layout_manager.cc", |
| "layout_manager.h", |
| "mus/mus_util.cc", |
| "mus/mus_util.h", |
| "scoped_window_targeter.cc", |
| "scoped_window_targeter.h", |
| "window.cc", |
| "window.h", |
| "window_delegate.h", |
| "window_event_dispatcher.cc", |
| "window_event_dispatcher.h", |
| "window_observer.cc", |
| "window_observer.h", |
| "window_port.cc", |
| "window_port.h", |
| "window_port_local.cc", |
| "window_port_local.h", |
| "window_targeter.cc", |
| "window_targeter.h", |
| "window_tracker.h", |
| "window_tree_host.cc", |
| "window_tree_host.h", |
| "window_tree_host_mac.h", |
| "window_tree_host_mac.mm", |
| "window_tree_host_observer.h", |
| "window_tree_host_platform.cc", |
| "window_tree_host_platform.h", |
| "window_tree_host_x11.cc", |
| "window_tree_host_x11.h", |
| ] |
| |
| defines = [ "AURA_IMPLEMENTATION" ] |
| |
| deps = [ |
| "//base", |
| "//base:i18n", |
| "//base/third_party/dynamic_annotations", |
| "//skia", |
| "//ui/base", |
| "//ui/base/ime", |
| "//ui/compositor", |
| "//ui/display", |
| "//ui/events", |
| "//ui/events:events_base", |
| "//ui/events/platform", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/platform_window", |
| ] |
| |
| if (use_x11) { |
| configs += [ |
| "//build/config/linux:x11", |
| "//build/config/linux:xrandr", |
| ] |
| deps += [ |
| "//ui/events:events_base", |
| "//ui/events/devices", |
| "//ui/events/devices/x11", |
| "//ui/events/platform/x11", |
| "//ui/gfx/x", |
| ] |
| } else { |
| sources -= [ |
| "window_tree_host_x11.cc", |
| "window_tree_host_x11.h", |
| ] |
| } |
| |
| if (is_win) { |
| sources -= [ "input_state_lookup.cc" ] |
| |
| deps += [ |
| "//ipc", |
| "//ui/platform_window/win", |
| ] |
| } |
| |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } |
| |
| if (is_android) { |
| deps += [ |
| "//ui/platform_window/android", |
| "//ui/platform_window/android:platform_window_java", |
| ] |
| } |
| } |
| |
| 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/env_test_helper.h", |
| "test/event_generator_delegate_aura.cc", |
| "test/event_generator_delegate_aura.h", |
| "test/input_method_glue.cc", |
| "test/input_method_glue.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_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_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", |
| ] |
| deps = [ |
| "//skia", |
| "//testing/gtest", |
| "//ui/base:test_support", |
| "//ui/base/ime", |
| "//ui/compositor:test_support", |
| "//ui/display", |
| "//ui/events", |
| "//ui/events:events_base", |
| "//ui/events:test_support", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/wm", |
| ] |
| |
| if (is_win) { |
| sources += [ "test/ui_controls_factory_aurawin.cc" ] |
| } |
| |
| if (use_x11) { |
| sources += [ |
| "test/ui_controls_factory_aurax11.cc", |
| "test/x11_event_sender.cc", |
| "test/x11_event_sender.h", |
| ] |
| |
| deps += [ "//ui/gfx/x" ] |
| } |
| |
| if (use_ozone) { |
| sources += [ "test/ui_controls_factory_ozone.cc" ] |
| } |
| } |
| |
| executable("demo") { |
| output_name = "aura_demo" |
| testonly = true |
| |
| sources = [ |
| "demo/demo_main.cc", |
| ] |
| |
| deps = [ |
| ":aura", |
| ":test_support", |
| "//base", |
| "//base:i18n", |
| "//build/config/sanitizers:deps", |
| "//build/win:default_exe_manifest", |
| "//cc/surfaces", |
| "//skia", |
| "//third_party/icu", |
| "//ui/base", |
| "//ui/compositor", |
| "//ui/compositor:test_support", |
| "//ui/display", |
| "//ui/events", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/gl/init", |
| ] |
| |
| if (use_x11) { |
| deps += [ "//ui/gfx/x" ] |
| } |
| } |
| |
| test("aura_unittests") { |
| sources = [ |
| "gestures/gesture_recognizer_unittest.cc", |
| "test/run_all_unittests.cc", |
| "window_event_dispatcher_unittest.cc", |
| "window_targeter_unittest.cc", |
| "window_tree_host_unittest.cc", |
| "window_unittest.cc", |
| ] |
| |
| deps = [ |
| ":test_support", |
| "//base/test:test_support", |
| "//skia", |
| "//testing/gtest", |
| "//ui/base:test_support", |
| "//ui/compositor:test_support", |
| "//ui/display:test_support", |
| "//ui/events:gesture_detection", |
| "//ui/events:test_support", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/gl:test_support", |
| ] |
| |
| if (is_linux) { |
| deps += [ "//third_party/mesa" ] |
| } |
| |
| data_deps = [ |
| "//third_party/mesa:osmesa", |
| ] |
| } |