Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / wm / BUILD.gn
blob36441c46a0cf6cdb0ac8a01100beac3cdcc80b06
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.
5 import("//build/config/ui.gni")
6 import("//testing/test.gni")
8 component("wm") {
9   sources = [
10     "core/accelerator_delegate.h",
11     "core/accelerator_filter.cc",
12     "core/accelerator_filter.h",
13     "core/base_focus_rules.cc",
14     "core/base_focus_rules.h",
15     "core/capture_controller.cc",
16     "core/capture_controller.h",
17     "core/compound_event_filter.cc",
18     "core/compound_event_filter.h",
19     "core/coordinate_conversion.cc",
20     "core/coordinate_conversion.h",
21     "core/cursor_manager.cc",
22     "core/cursor_manager.h",
23     "core/default_activation_client.cc",
24     "core/default_activation_client.h",
25     "core/default_screen_position_client.cc",
26     "core/default_screen_position_client.h",
27     "core/easy_resize_window_targeter.cc",
28     "core/easy_resize_window_targeter.h",
29     "core/focus_controller.cc",
30     "core/focus_controller.h",
31     "core/focus_rules.h",
32     "core/image_grid.cc",
33     "core/image_grid.h",
34     "core/masked_window_targeter.cc",
35     "core/masked_window_targeter.h",
36     "core/native_cursor_manager.h",
37     "core/native_cursor_manager_delegate.h",
38     "core/nested_accelerator_controller.cc",
39     "core/nested_accelerator_controller.h",
40     "core/nested_accelerator_delegate.h",
41     "core/nested_accelerator_dispatcher.cc",
42     "core/nested_accelerator_dispatcher.h",
43     "core/nested_accelerator_dispatcher_linux.cc",
44     "core/nested_accelerator_dispatcher_win.cc",
45     "core/shadow.cc",
46     "core/shadow.h",
47     "core/shadow_controller.cc",
48     "core/shadow_controller.h",
49     "core/shadow_types.cc",
50     "core/shadow_types.h",
51     "core/transient_window_controller.cc",
52     "core/transient_window_controller.h",
53     "core/transient_window_manager.cc",
54     "core/transient_window_manager.h",
55     "core/transient_window_observer.h",
56     "core/transient_window_stacking_client.cc",
57     "core/transient_window_stacking_client.h",
58     "core/visibility_controller.cc",
59     "core/visibility_controller.h",
60     "core/window_animations.cc",
61     "core/window_animations.h",
62     "core/window_modality_controller.cc",
63     "core/window_modality_controller.h",
64     "core/window_util.cc",
65     "core/window_util.h",
66     "core/wm_core_switches.cc",
67     "core/wm_core_switches.h",
68     "core/wm_state.cc",
69     "core/wm_state.h",
70     "wm_export.h",
71   ]
73   defines = [ "WM_IMPLEMENTATION" ]
75   deps = [
76     "//base",
77     "//skia",
78     "//ui/aura",
79     "//ui/base",
80     "//ui/base/ime",
81     "//ui/compositor",
82     "//ui/events",
83     "//ui/events/devices",
84     "//ui/events/platform",
85     "//ui/events:events_base",
86     "//ui/events/platform",
87     "//ui/gfx",
88     "//ui/gfx/geometry",
89     "//ui/resources",
90   ]
92   if (use_x11) {
93     configs += [ "//build/config/linux:x11" ]
94   }
96   if (is_android) {
97     sources -= [
98       "core/nested_accelerator_controller.cc",
99       "core/nested_accelerator_controller.h",
100       "core/nested_accelerator_delegate.h",
101       "core/nested_accelerator_dispatcher.cc",
102       "core/nested_accelerator_dispatcher.h",
103     ]
104   }
107 static_library("test_support") {
108   testonly = true
109   sources = [
110     "test/wm_test_helper.cc",
111     "test/wm_test_helper.h",
112   ]
114   deps = [
115     ":wm",
116     "//skia",
117     "//ui/aura",
118     "//ui/aura:test_support",
119     "//ui/base",
120     "//ui/base/ime",
121     "//ui/events",
122     "//ui/events:events_base",
123   ]
126 # TODO(GYP): Delete this after we've converted everything to GN.
127 # The _run targets exist only for compatibility w/ GYP.
128 group("wm_unittests_run") {
129   testonly = true
130   deps = [
131     ":wm_unittests",
132   ]
135 test("wm_unittests") {
136   sources = [
137     "core/capture_controller_unittest.cc",
138     "core/compound_event_filter_unittest.cc",
139     "core/cursor_manager_unittest.cc",
140     "core/focus_controller_unittest.cc",
141     "core/image_grid_unittest.cc",
142     "core/nested_accelerator_controller_unittest.cc",
143     "core/shadow_controller_unittest.cc",
144     "core/transient_window_manager_unittest.cc",
145     "core/transient_window_stacking_client_unittest.cc",
146     "core/visibility_controller_unittest.cc",
147     "core/window_animations_unittest.cc",
148     "test/run_all_unittests.cc",
149   ]
151   data = [
152     "$root_out_dir/ui_test.pak",
153   ]
155   deps = [
156     ":test_support",
157     ":wm",
158     "//base",
159     "//base/test:test_support",
160     "//skia",
161     "//testing/gtest",
162     "//ui/aura:test_support",
163     "//ui/base:test_support",
164     "//ui/base/ime",
165     "//ui/compositor:test_support",
166     "//ui/events:test_support",
167     "//ui/events/platform",
168     "//ui/gfx",
169     "//ui/gfx/geometry",
170     "//ui/gl",
171   ]