Include all dupe types (event when value is zero) in scan stats.
[chromium-blink-merge.git] / components / view_manager / BUILD.gn
blob44b2bc340fac0f3fd074c1b664858c3e7575a10c
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("//third_party/mojo/src/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       ":jni_headers",
16       ":lib",
17       ":loader",
18       ":view_manager_java",
19       "native_viewport",
20     ]
21   }
23   android_library("view_manager_java") {
24     java_files = [ "native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java" ]
26     deps = [
27       "//base:base_java",
28     ]
29   }
31   generate_jni("jni_headers") {
32     sources = [
33       "native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java",
34     ]
36     jni_package = "mojo"
37   }
39   source_set("loader") {
40     sources = [
41       "android_loader.cc",
42       "android_loader.h",
43     ]
45     deps = [
46       "public/interfaces",
47       "//third_party/mojo/src/mojo/public/cpp/bindings",
48     ]
49   }
50 } else {
51   mojo_native_application("view_manager") {
52     sources = [
53       "main.cc",
54     ]
56     deps = [
57       ":lib",
58       "//base",
59       "//components/view_manager/public/interfaces",
60       "//components/view_manager/native_viewport",
61       "//mojo/application/public/cpp",
62       "//mojo/converters/geometry",
63       "//mojo/environment:chromium",
64       "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
65       "//ui/events",
66       "//ui/events/platform",
67       "//ui/gl",
68     ]
70     data_deps = [ "//components/view_manager/surfaces" ]
71   }
74 source_set("lib") {
75   sources = [
76     "access_policy.h",
77     "access_policy_delegate.h",
78     "animation_runner.cc",
79     "animation_runner.h",
80     "animation_runner_observer.h",
81     "client_connection.cc",
82     "client_connection.h",
83     "connection_manager.cc",
84     "connection_manager.h",
85     "connection_manager_delegate.h",
86     "default_access_policy.cc",
87     "default_access_policy.h",
88     "display_manager.cc",
89     "display_manager.h",
90     "event_dispatcher.cc",
91     "event_dispatcher.h",
92     "focus_controller.cc",
93     "focus_controller.h",
94     "focus_controller_delegate.h",
95     "gesture_manager.cc",
96     "gesture_manager.h",
97     "gesture_manager_delegate.h",
98     "scheduled_animation_group.cc",
99     "scheduled_animation_group.h",
100     "server_view.cc",
101     "server_view.h",
102     "server_view_delegate.h",
103     "server_view_drawn_tracker.cc",
104     "server_view_drawn_tracker.h",
105     "server_view_drawn_tracker_observer.h",
106     "server_view_observer.h",
107     "view_coordinate_conversions.cc",
108     "view_coordinate_conversions.h",
109     "view_locator.cc",
110     "view_locator.h",
111     "view_manager_app.cc",
112     "view_manager_app.h",
113     "view_manager_service_impl.cc",
114     "view_manager_service_impl.h",
115     "window_manager_access_policy.cc",
116     "window_manager_access_policy.h",
117   ]
119   public_deps = [
120     "//components/view_manager/public/cpp",
121   ]
123   deps = [
124     "//base",
125     "//cc/surfaces",
126     "//cc/surfaces:surface_id",
127     "//components/view_manager/public/cpp:common",
128     "//components/view_manager/public/interfaces",
129     "//components/view_manager/native_viewport",
130     "//mojo/application/public/cpp",
131     "//mojo/common:tracing_impl",
132     "//mojo/converters/geometry",
133     "//mojo/converters/input_events",
134     "//mojo/converters/surfaces",
135     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
136     "//ui/mojo/geometry:interfaces",
137     "//ui/mojo/events:interfaces",
138     "//ui/gfx",
139     "//ui/gfx/geometry",
140   ]
143 source_set("test_support") {
144   testonly = true
146   sources = [
147     "test_change_tracker.cc",
148     "test_change_tracker.h",
149   ]
151   deps = [
152     "//base",
153     "//components/view_manager/public/cpp",
154     "//components/view_manager/public/cpp:common",
155     "//components/view_manager/public/interfaces",
156     "//mojo/common",
157     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
158     "//ui/mojo/geometry:interfaces",
159   ]
162 group("tests") {
163   testonly = true
164   deps = [
165     ":apptests",
166     ":view_manager_unittests",
167     "//components/view_manager/public/cpp/tests:mojo_view_manager_lib_unittests",
168   ]
171 test("view_manager_unittests") {
172   sources = [
173     "animation_runner_unittest.cc",
174     "focus_controller_unittest.cc",
175     "gesture_manager_unittest.cc",
176     "scheduled_animation_group_unittest.cc",
177     "server_view_drawn_tracker_unittest.cc",
178     "test_server_view_delegate.cc",
179     "test_server_view_delegate.h",
180     "view_coordinate_conversions_unittest.cc",
181     "view_manager_service_unittest.cc",
182   ]
184   deps = [
185     ":test_support",
186     ":lib",
187     "//base",
188     "//base/test:test_config",
189     "//components/view_manager/public/cpp:common",
190     "//components/view_manager/public/interfaces",
191     "//mojo/application/public/interfaces",
192     "//mojo/converters/geometry",
193     "//mojo/converters/input_events",
194     "//mojo/environment:chromium",
195     "//third_party/mojo/src/mojo/edk/test:run_all_unittests",
196     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
197     "//ui/mojo/geometry:interfaces",
198     "//ui/mojo/events:interfaces",
199     "//testing/gtest",
200     "//ui/gfx",
201     "//ui/gfx:test_support",
202     "//ui/gfx/geometry",
203   ]
205   if (!is_android) {  # TODO(GYP) Enable on Android when osmesa links.
206     deps += [ "//third_party/mesa:osmesa" ]
207   }
210 mojo_native_application("apptests") {
211   output_name = "view_manager_apptests"
212   testonly = true
214   sources = [
215     "view_manager_client_apptest.cc",
216     "view_manager_service_apptest.cc",
217   ]
219   deps = [
220     ":test_support",
221     "//base",
222     "//base/test:test_config",
223     "//components/view_manager/public/cpp",
224     "//components/view_manager/public/interfaces",
225     "//mojo/application/public/cpp:test_support",
226     "//ui/mojo/geometry:interfaces",
227     "//ui/mojo/geometry:util",
228   ]
230   data_deps = [ ":view_manager" ]