Reland "Non-SFI mode: Switch to newlib. (patchset #4 id:60001 of https://codereview...
[chromium-blink-merge.git] / components / view_manager / BUILD.gn
blobc04147fb2ae391bac880c528639e23d7dd7b99e5
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   group("view_manager") {
14     deps = [
15       ":lib",
16       ":loader",
17       "native_viewport",
18     ]
19   }
21   source_set("loader") {
22     sources = [
23       "android_loader.cc",
24       "android_loader.h",
25     ]
27     deps = [
28       "public/interfaces",
29       "//third_party/mojo/src/mojo/public/cpp/bindings",
30     ]
31   }
32 } else {
33   mojo_native_application("view_manager") {
34     sources = [
35       "main.cc",
36     ]
38     deps = [
39       ":lib",
40       "//base",
41       "//components/view_manager/public/interfaces",
42       "//components/view_manager/native_viewport",
43       "//mojo/application/public/cpp",
44       "//mojo/converters/geometry",
45       "//mojo/environment:chromium",
46       "//mojo/platform_handle",
47       "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
48       "//ui/events",
49       "//ui/events/platform",
50       "//ui/gl",
51     ]
53     data_deps = [ "//components/view_manager/surfaces" ]
54   }
57 source_set("lib") {
58   sources = [
59     "access_policy.h",
60     "access_policy_delegate.h",
61     "animation_runner.cc",
62     "animation_runner.h",
63     "animation_runner_observer.h",
64     "client_connection.cc",
65     "client_connection.h",
66     "connection_manager.cc",
67     "connection_manager.h",
68     "connection_manager_delegate.h",
69     "default_access_policy.cc",
70     "default_access_policy.h",
71     "display_manager.cc",
72     "display_manager.h",
73     "display_manager_delegate.h",
74     "display_manager_factory.h",
75     "event_dispatcher.cc",
76     "event_dispatcher.h",
77     "focus_controller.cc",
78     "focus_controller.h",
79     "focus_controller_delegate.h",
80     "gesture_manager.cc",
81     "gesture_manager.h",
82     "gesture_manager_delegate.h",
83     "scheduled_animation_group.cc",
84     "scheduled_animation_group.h",
85     "server_view.cc",
86     "server_view.h",
87     "server_view_delegate.h",
88     "server_view_drawn_tracker.cc",
89     "server_view_drawn_tracker.h",
90     "server_view_drawn_tracker_observer.h",
91     "server_view_observer.h",
92     "view_coordinate_conversions.cc",
93     "view_coordinate_conversions.h",
94     "view_locator.cc",
95     "view_locator.h",
96     "view_manager_app.cc",
97     "view_manager_app.h",
98     "view_manager_root_impl.cc",
99     "view_manager_root_impl.h",
100     "view_manager_service_impl.cc",
101     "view_manager_service_impl.h",
102     "window_manager_access_policy.cc",
103     "window_manager_access_policy.h",
104   ]
106   public_deps = [
107     "//components/view_manager/public/cpp",
108   ]
110   deps = [
111     "//base",
112     "//cc/surfaces",
113     "//cc/surfaces:surface_id",
114     "//components/view_manager/public/cpp:common",
115     "//components/view_manager/public/interfaces",
116     "//components/view_manager/native_viewport",
117     "//mojo/application/public/cpp",
118     "//mojo/common:tracing_impl",
119     "//mojo/converters/geometry",
120     "//mojo/converters/input_events",
121     "//mojo/converters/surfaces",
122     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
123     "//ui/mojo/geometry:interfaces",
124     "//ui/mojo/events:interfaces",
125     "//ui/gfx",
126     "//ui/gfx/geometry",
127   ]
130 source_set("test_support") {
131   testonly = true
133   sources = [
134     "test_change_tracker.cc",
135     "test_change_tracker.h",
136   ]
138   deps = [
139     "//base",
140     "//components/view_manager/public/cpp",
141     "//components/view_manager/public/cpp:common",
142     "//components/view_manager/public/interfaces",
143     "//mojo/common",
144     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
145     "//ui/mojo/geometry:interfaces",
146   ]
149 group("tests") {
150   testonly = true
151   deps = [
152     ":apptests",
153     ":view_manager_unittests",
154     "//components/view_manager/public/cpp/tests:mojo_view_manager_lib_unittests",
155   ]
158 test("view_manager_unittests") {
159   sources = [
160     "animation_runner_unittest.cc",
161     "focus_controller_unittest.cc",
162     "gesture_manager_unittest.cc",
163     "scheduled_animation_group_unittest.cc",
164     "server_view_drawn_tracker_unittest.cc",
165     "test_server_view_delegate.cc",
166     "test_server_view_delegate.h",
167     "view_coordinate_conversions_unittest.cc",
168     "view_manager_service_unittest.cc",
169   ]
171   deps = [
172     ":test_support",
173     ":lib",
174     "//base",
175     "//base/test:test_config",
176     "//components/view_manager/public/cpp:common",
177     "//components/view_manager/public/interfaces",
178     "//mojo/application/public/interfaces",
179     "//mojo/converters/geometry",
180     "//mojo/converters/input_events",
181     "//mojo/environment:chromium",
182     "//mojo/platform_handle",
183     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
184     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
185     "//ui/mojo/geometry:interfaces",
186     "//ui/mojo/events:interfaces",
187     "//testing/gtest",
188     "//ui/gfx",
189     "//ui/gfx:test_support",
190     "//ui/gfx/geometry",
191   ]
193   if (!is_android) {  # TODO(GYP) Enable on Android when osmesa links.
194     deps += [ "//third_party/mesa:osmesa" ]
195   }
198 mojo_native_application("apptests") {
199   output_name = "view_manager_apptests"
200   testonly = true
202   sources = [
203     "view_manager_client_apptest.cc",
204     "view_manager_service_apptest.cc",
205   ]
207   deps = [
208     ":test_support",
209     "//base",
210     "//base/test:test_config",
211     "//components/view_manager/public/cpp",
212     "//components/view_manager/public/cpp/tests:test_support",
213     "//components/view_manager/public/interfaces",
214     "//mojo/application/public/cpp:test_support",
215     "//ui/mojo/geometry:interfaces",
216     "//ui/mojo/geometry:util",
217   ]
219   data_deps = [ ":view_manager" ]