blob: 6548409c0b54a4433f16e24fa04be109e86e6672 [file] [log] [blame]
# Copyright 2015 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("//mojo/public/mojo_application.gni")
import("//mojo/public/mojo_application_manifest.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//tools/grit/repack.gni")
group("tests") {
testonly = true
deps = [
":apptests",
]
}
source_set("lib") {
sources = [
"accelerator_registrar_impl.cc",
"accelerator_registrar_impl.h",
"background_layout.cc",
"background_layout.h",
"fill_layout.cc",
"fill_layout.h",
"frame/caption_buttons/caption_button_types.h",
"frame/caption_buttons/frame_caption_button.cc",
"frame/caption_buttons/frame_caption_button.h",
"frame/caption_buttons/frame_caption_button_container_view.cc",
"frame/caption_buttons/frame_caption_button_container_view.h",
"frame/default_header_painter.cc",
"frame/default_header_painter.h",
"frame/frame_border_hit_test_controller.cc",
"frame/frame_border_hit_test_controller.h",
"frame/header_painter.h",
"frame/header_painter_util.cc",
"frame/header_painter_util.h",
"frame/move_event_handler.cc",
"frame/move_event_handler.h",
"frame/move_loop.cc",
"frame/move_loop.h",
"frame/non_client_frame_view_mash.cc",
"frame/non_client_frame_view_mash.h",
"layout_manager.cc",
"layout_manager.h",
"non_client_frame_controller.cc",
"non_client_frame_controller.h",
"property_util.cc",
"property_util.h",
"root_window_controller.cc",
"root_window_controller.h",
"root_windows_observer.h",
"screenlock_layout.cc",
"screenlock_layout.h",
"shadow.cc",
"shadow.h",
"shadow_controller.cc",
"shadow_controller.h",
"shelf_layout.cc",
"shelf_layout.h",
"user_window_controller_impl.cc",
"user_window_controller_impl.h",
"window_layout.cc",
"window_layout.h",
"window_manager.cc",
"window_manager.h",
"window_manager_application.cc",
"window_manager_application.h",
]
deps = [
"//base",
"//components/mus/common:mus_common",
"//components/mus/public/cpp",
"//components/mus/public/interfaces",
"//mash/session/public/interfaces",
"//mash/wm/public/interfaces",
"//mash/wm/resources",
"//mojo/common:common_base",
"//mojo/converters/geometry",
"//mojo/converters/input_events",
"//mojo/services/tracing/public/cpp",
"//mojo/shell/public/cpp",
"//skia",
"//ui/aura",
"//ui/events",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/mojo/init",
"//ui/resources",
"//ui/strings",
"//ui/views",
"//ui/views/mus:for_mojo_application",
]
}
mojo_native_application("wm") {
output_name = "desktop_wm"
sources = [
"main.cc",
]
deps = [
":lib",
":resources",
"//mojo/shell/public/cpp",
]
# TODO(beng): This target relies on //mash/session, but there is a cycle so we
# can't state that dependency here.
data_deps = [
":manifest",
"//components/mus",
]
resources = [ "$root_out_dir/mash_wm_resources.pak" ]
}
mojo_application_manifest("manifest") {
application_name = "desktop_wm"
source = "manifest.json"
}
repack("resources") {
sources = [
"$root_gen_dir/mash/wm/resources/mash_wm_resources_100_percent.pak",
"$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
"$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
"$root_gen_dir/ui/strings/ui_strings_en-US.pak",
"$root_gen_dir/ui/views/resources/views_resources_100_percent.pak",
]
output = "$root_out_dir/mash_wm_resources.pak"
deps = [
"//mash/wm/resources",
"//ui/resources",
"//ui/strings",
"//ui/views/mus:resources",
"//ui/views/resources",
]
}
mojo_native_application("apptests") {
output_name = "mash_wm_apptests"
testonly = true
sources = [
"accelerator_registrar_apptest.cc",
"window_manager_apptest.cc",
]
deps = [
"//base",
"//base/test:test_config",
"//components/mus/public/cpp",
"//components/mus/public/interfaces",
"//mojo/common:common_base",
"//mojo/converters/geometry",
"//mojo/converters/input_events",
"//mojo/shell/public/cpp:sources",
"//mojo/shell/public/cpp:test_support",
"//ui/mojo/geometry:interfaces",
"//ui/mojo/geometry:util",
]
data_deps = [
":apptest_manifest",
":wm",
]
if (use_x11) {
deps += [ "//tools/xdisplaycheck" ]
}
}
mojo_application_manifest("apptest_manifest") {
application_name = "mash_wm_apptests"
source = "apptest_manifest.json"
}
source_set("unittests") {
testonly = true
sources = [
"frame/move_loop_unittest.cc",
"layout_manager_unittest.cc",
]
deps = [
":lib",
"//base",
"//base/test:test_config",
"//components/mus/public/cpp",
"//components/mus/public/cpp/tests:unittest_support",
"//mojo/converters/geometry",
"//mojo/converters/input_events",
"//mojo/edk/system",
"//mojo/gles2",
"//mojo/platform_handle",
"//mojo/public/cpp/system",
"//testing/gtest",
"//ui/base",
"//ui/events",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/mojo/geometry:interfaces",
"//ui/mojo/geometry:util",
]
}