Roll src/third_party/WebKit 6b63e20:35e1984 (svn 201060:201061)
[chromium-blink-merge.git] / components / view_manager / BUILD.gn
blob01451d884240736550d5dad75c90dd2cfa67a1a3
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("view_manager") {
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("view_manager") {
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     "animation_runner.cc",
46     "animation_runner.h",
47     "animation_runner_observer.h",
48     "client_connection.cc",
49     "client_connection.h",
50     "connection_manager.cc",
51     "connection_manager.h",
52     "connection_manager_delegate.h",
53     "default_access_policy.cc",
54     "default_access_policy.h",
55     "display_manager.cc",
56     "display_manager.h",
57     "display_manager_delegate.h",
58     "display_manager_factory.h",
59     "event_dispatcher.cc",
60     "event_dispatcher.h",
61     "focus_controller.cc",
62     "focus_controller.h",
63     "focus_controller_delegate.h",
64     "gesture_manager.cc",
65     "gesture_manager.h",
66     "gesture_manager_delegate.h",
67     "scheduled_animation_group.cc",
68     "scheduled_animation_group.h",
69     "server_view.cc",
70     "server_view.h",
71     "server_view_delegate.h",
72     "server_view_drawn_tracker.cc",
73     "server_view_drawn_tracker.h",
74     "server_view_drawn_tracker_observer.h",
75     "server_view_observer.h",
76     "view_coordinate_conversions.cc",
77     "view_coordinate_conversions.h",
78     "view_locator.cc",
79     "view_locator.h",
80     "view_manager_app.cc",
81     "view_manager_app.h",
82     "view_manager_root_connection.cc",
83     "view_manager_root_connection.h",
84     "view_manager_root_delegate.h",
85     "view_manager_root_impl.cc",
86     "view_manager_root_impl.h",
87     "view_manager_service_impl.cc",
88     "view_manager_service_impl.h",
89     "window_manager_access_policy.cc",
90     "window_manager_access_policy.h",
91   ]
93   public_deps = [
94     "//components/view_manager/public/cpp",
95   ]
97   deps = [
98     "//base",
99     "//cc",
100     "//cc/surfaces",
101     "//cc/surfaces:surface_id",
102     "//components/view_manager/gles2:gles2",
103     "//components/view_manager/public/cpp:common",
104     "//components/view_manager/public/interfaces",
105     "//components/view_manager/surfaces",
106     "//mojo/application/public/cpp",
107     "//mojo/common:tracing_impl",
108     "//mojo/converters/geometry",
109     "//mojo/converters/ime",
110     "//mojo/converters/input_events",
111     "//mojo/converters/surfaces",
112     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
113     "//ui/events",
114     "//ui/events/platform",
115     "//ui/gfx",
116     "//ui/gfx/geometry",
117     "//ui/gl:gl",
118     "//ui/gl:test_support",
119     "//ui/mojo/events:interfaces",
120     "//ui/mojo/geometry:interfaces",
121     "//ui/platform_window:platform_impls",
122     "//ui/platform_window:platform_window",
123   ]
126 source_set("test_support") {
127   testonly = true
129   sources = [
130     "test_change_tracker.cc",
131     "test_change_tracker.h",
132   ]
134   deps = [
135     "//base",
136     "//components/view_manager/public/cpp",
137     "//components/view_manager/public/cpp:common",
138     "//components/view_manager/public/interfaces",
139     "//mojo/common",
140     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
141     "//ui/mojo/geometry:interfaces",
142   ]
145 group("tests") {
146   testonly = true
147   deps = [
148     ":apptests",
149     ":view_manager_unittests",
150     "//components/view_manager/public/cpp/tests:mojo_view_manager_lib_unittests",
151   ]
154 test("view_manager_unittests") {
155   sources = [
156     "animation_runner_unittest.cc",
157     "focus_controller_unittest.cc",
158     "gesture_manager_unittest.cc",
159     "scheduled_animation_group_unittest.cc",
160     "server_view_drawn_tracker_unittest.cc",
161     "test_server_view_delegate.cc",
162     "test_server_view_delegate.h",
163     "view_coordinate_conversions_unittest.cc",
164     "view_manager_service_unittest.cc",
165   ]
167   deps = [
168     ":test_support",
169     ":lib",
170     "//base",
171     "//base/test:test_config",
172     "//components/view_manager/public/cpp:common",
173     "//components/view_manager/public/interfaces",
174     "//components/view_manager/surfaces",
175     "//mojo/application/public/interfaces",
176     "//mojo/converters/geometry",
177     "//mojo/converters/input_events",
178     "//mojo/converters/transform",
179     "//mojo/environment:chromium",
180     "//mojo/platform_handle",
181     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
182     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
183     "//ui/mojo/geometry:interfaces",
184     "//ui/mojo/events:interfaces",
185     "//testing/gtest",
186     "//ui/gfx",
187     "//ui/gfx:test_support",
188     "//ui/gfx/geometry",
189   ]
191   if (!is_android) {  # TODO(GYP) Enable on Android when osmesa links.
192     deps += [ "//third_party/mesa:osmesa" ]
193   }
196 mojo_native_application("apptests") {
197   output_name = "view_manager_apptests"
198   testonly = true
200   sources = [
201     "view_manager_client_apptest.cc",
202     "view_manager_service_apptest.cc",
203   ]
205   deps = [
206     ":test_support",
207     "//base",
208     "//base/test:test_config",
209     "//components/view_manager/public/cpp",
210     "//components/view_manager/public/cpp/tests:test_support",
211     "//components/view_manager/public/interfaces",
212     "//mojo/application/public/cpp:sources",
213     "//mojo/application/public/cpp:test_support",
214     "//ui/mojo/geometry:interfaces",
215     "//ui/mojo/geometry:util",
216   ]
218   data_deps = [ ":view_manager" ]