Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / view_manager / BUILD.gn
blob26c4154200713f3c0284b93dfc451ec11c1126d9
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_tree_host_connection.cc",
83     "view_tree_host_connection.h",
84     "view_tree_host_delegate.h",
85     "view_tree_host_impl.cc",
86     "view_tree_host_impl.h",
87     "view_tree_impl.cc",
88     "view_tree_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:common_base",
108     "//mojo/common:tracing_impl",
109     "//mojo/converters/geometry",
110     "//mojo/converters/ime",
111     "//mojo/converters/input_events",
112     "//mojo/converters/surfaces",
113     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
114     "//ui/events",
115     "//ui/events/platform",
116     "//ui/gfx",
117     "//ui/gfx/geometry",
118     "//ui/gl:gl",
119     "//ui/gl:test_support",
120     "//ui/mojo/events:interfaces",
121     "//ui/mojo/geometry:interfaces",
122     "//ui/platform_window:platform_impls",
123     "//ui/platform_window:platform_window",
124   ]
127 source_set("test_support") {
128   testonly = true
130   sources = [
131     "test_change_tracker.cc",
132     "test_change_tracker.h",
133   ]
135   deps = [
136     "//base",
137     "//components/view_manager/public/cpp",
138     "//components/view_manager/public/cpp:common",
139     "//components/view_manager/public/interfaces",
140     "//mojo/common",
141     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
142     "//ui/mojo/geometry:interfaces",
143   ]
146 group("tests") {
147   testonly = true
148   deps = [
149     ":apptests",
150     ":view_manager_unittests",
151     "//components/view_manager/public/cpp/tests:mojo_view_manager_lib_unittests",
152   ]
155 test("view_manager_unittests") {
156   sources = [
157     "animation_runner_unittest.cc",
158     "focus_controller_unittest.cc",
159     "gesture_manager_unittest.cc",
160     "scheduled_animation_group_unittest.cc",
161     "server_view_drawn_tracker_unittest.cc",
162     "test_server_view_delegate.cc",
163     "test_server_view_delegate.h",
164     "view_coordinate_conversions_unittest.cc",
165     "view_tree_unittest.cc",
166   ]
168   deps = [
169     ":test_support",
170     ":lib",
171     "//base",
172     "//base/test:test_config",
173     "//components/view_manager/public/cpp:common",
174     "//components/view_manager/public/interfaces",
175     "//components/view_manager/surfaces",
176     "//mojo/application/public/interfaces",
177     "//mojo/converters/geometry",
178     "//mojo/converters/input_events",
179     "//mojo/converters/transform",
180     "//mojo/environment:chromium",
181     "//mojo/platform_handle",
182     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
183     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
184     "//ui/mojo/geometry:interfaces",
185     "//ui/mojo/events:interfaces",
186     "//testing/gtest",
187     "//ui/gfx",
188     "//ui/gfx:test_support",
189     "//ui/gfx/geometry",
190   ]
192   if (!is_android) {  # TODO(GYP) Enable on Android when osmesa links.
193     deps += [ "//third_party/mesa:osmesa" ]
194   }
197 mojo_native_application("apptests") {
198   output_name = "view_manager_apptests"
199   testonly = true
201   sources = [
202     "view_manager_client_apptest.cc",
203     "view_tree_apptest.cc",
204   ]
206   deps = [
207     ":test_support",
208     "//base",
209     "//base/test:test_config",
210     "//components/view_manager/public/cpp",
211     "//components/view_manager/public/cpp/tests:test_support",
212     "//components/view_manager/public/interfaces",
213     "//mojo/application/public/cpp:sources",
214     "//mojo/application/public/cpp:test_support",
215     "//ui/mojo/geometry:interfaces",
216     "//ui/mojo/geometry:util",
217   ]
219   data_deps = [ ":view_manager" ]