Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / components / mus / BUILD.gn
blob956f8ff085c7b970ca56fe7053621589bbd9d496
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")
7 import("//mojo/public/mojo_application.gni")
9 if (is_android) {
10   import("//build/config/android/config.gni")
11   import("//build/config/android/rules.gni")
13   source_set("mus") {
14     sources = [
15       "android_loader.cc",
16       "android_loader.h",
17     ]
19     deps = [
20       ":lib",
21       "public/interfaces",
22       "//mojo/application/public/cpp:sources",
23       "//mojo/services/tracing/public/interfaces",
24       "//mojo/shell",
25       "//third_party/mojo/src/mojo/public/cpp/bindings",
26     ]
27   }
28 } else {
29   mojo_native_application("mus") {
30     sources = [
31       "main.cc",
32     ]
34     deps = [
35       ":lib",
36       "//mojo/application/public/cpp:sources",
37     ]
38   }
41 source_set("lib") {
42   sources = [
43     "access_policy.h",
44     "access_policy_delegate.h",
45     "client_connection.cc",
46     "client_connection.h",
47     "connection_manager.cc",
48     "connection_manager.h",
49     "connection_manager_delegate.h",
50     "default_access_policy.cc",
51     "default_access_policy.h",
52     "display_manager.cc",
53     "display_manager.h",
54     "display_manager_delegate.h",
55     "display_manager_factory.h",
56     "event_dispatcher.cc",
57     "event_dispatcher.h",
58     "focus_controller.cc",
59     "focus_controller.h",
60     "focus_controller_delegate.h",
61     "gesture_manager.cc",
62     "gesture_manager.h",
63     "gesture_manager_delegate.h",
64     "mus_app.cc",
65     "mus_app.h",
66     "server_view.cc",
67     "server_view.h",
68     "server_view_delegate.h",
69     "server_view_drawn_tracker.cc",
70     "server_view_drawn_tracker.h",
71     "server_view_drawn_tracker_observer.h",
72     "server_view_observer.h",
73     "view_coordinate_conversions.cc",
74     "view_coordinate_conversions.h",
75     "view_locator.cc",
76     "view_locator.h",
77     "view_tree_host_connection.cc",
78     "view_tree_host_connection.h",
79     "view_tree_host_delegate.h",
80     "view_tree_host_impl.cc",
81     "view_tree_host_impl.h",
82     "view_tree_impl.cc",
83     "view_tree_impl.h",
84     "window_manager_access_policy.cc",
85     "window_manager_access_policy.h",
86   ]
88   public_deps = [
89     "//components/mus/public/cpp",
90   ]
92   deps = [
93     "//base",
94     "//cc",
95     "//cc/surfaces",
96     "//cc/surfaces:surface_id",
97     "//components/mus/gles2:gles2",
98     "//components/mus/public/cpp:common",
99     "//components/mus/public/interfaces",
100     "//components/mus/surfaces",
101     "//mojo/application/public/cpp",
102     "//mojo/common:common_base",
103     "//mojo/common:tracing_impl",
104     "//mojo/converters/geometry",
105     "//mojo/converters/ime",
106     "//mojo/converters/input_events",
107     "//mojo/converters/surfaces",
108     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
109     "//ui/events",
110     "//ui/events/platform",
111     "//ui/gfx",
112     "//ui/gfx/geometry",
113     "//ui/gl:gl",
114     "//ui/gl:test_support",
115     "//ui/mojo/events:interfaces",
116     "//ui/mojo/geometry:interfaces",
117     "//ui/platform_window:platform_impls",
118     "//ui/platform_window:platform_window",
119   ]
122 source_set("test_support") {
123   testonly = true
125   sources = [
126     "test_change_tracker.cc",
127     "test_change_tracker.h",
128   ]
130   deps = [
131     "//base",
132     "//components/mus/public/cpp",
133     "//components/mus/public/cpp:common",
134     "//components/mus/public/interfaces",
135     "//mojo/common",
136     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
137     "//ui/mojo/geometry:interfaces",
138   ]
141 group("tests") {
142   testonly = true
143   deps = [
144     ":apptests",
145     ":view_manager_unittests",
146     "//components/mus/public/cpp/tests:mojo_view_manager_lib_unittests",
147   ]
150 test("view_manager_unittests") {
151   sources = [
152     "focus_controller_unittest.cc",
153     "gesture_manager_unittest.cc",
154     "server_view_drawn_tracker_unittest.cc",
155     "test_server_view_delegate.cc",
156     "test_server_view_delegate.h",
157     "view_coordinate_conversions_unittest.cc",
158     "view_tree_unittest.cc",
159   ]
161   deps = [
162     ":test_support",
163     ":lib",
164     "//base",
165     "//base/test:test_config",
166     "//components/mus/public/cpp:common",
167     "//components/mus/public/interfaces",
168     "//components/mus/surfaces",
169     "//mojo/application/public/interfaces",
170     "//mojo/converters/geometry",
171     "//mojo/converters/input_events",
172     "//mojo/converters/transform",
173     "//mojo/environment:chromium",
174     "//mojo/platform_handle",
175     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
176     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
177     "//ui/mojo/geometry:interfaces",
178     "//ui/mojo/events:interfaces",
179     "//testing/gtest",
180     "//ui/gfx",
181     "//ui/gfx:test_support",
182     "//ui/gfx/geometry",
183   ]
185   if (!is_android) {  # TODO(GYP) Enable on Android when osmesa links.
186     deps += [ "//third_party/mesa:osmesa" ]
187   }
190 mojo_native_application("apptests") {
191   output_name = "mus_apptests"
192   testonly = true
194   sources = [
195     "view_manager_client_apptest.cc",
196     "view_tree_apptest.cc",
197   ]
199   deps = [
200     ":test_support",
201     "//base",
202     "//base/test:test_config",
203     "//components/mus/public/cpp",
204     "//components/mus/public/cpp/tests:test_support",
205     "//components/mus/public/interfaces",
206     "//mojo/application/public/cpp:sources",
207     "//mojo/application/public/cpp:test_support",
208     "//ui/mojo/geometry:interfaces",
209     "//ui/mojo/geometry:util",
210   ]
212   data_deps = [ ":mus" ]