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")
10 import("//build/config/android/config.gni")
11 import("//build/config/android/rules.gni")
13 group("view_manager") {
23 android_library("view_manager_java") {
24 java_files = [ "native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java" ]
31 generate_jni("jni_headers") {
33 "native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java",
39 source_set("loader") {
47 "//third_party/mojo/src/mojo/public/cpp/bindings",
51 mojo_native_application("view_manager") {
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",
66 "//ui/events/platform",
70 data_deps = [ "//components/view_manager/surfaces" ]
77 "access_policy_delegate.h",
78 "animation_runner.cc",
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",
90 "event_dispatcher.cc",
92 "focus_controller.cc",
94 "focus_controller_delegate.h",
97 "gesture_manager_delegate.h",
98 "scheduled_animation_group.cc",
99 "scheduled_animation_group.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",
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",
120 "//components/view_manager/public/cpp",
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",
143 source_set("test_support") {
147 "test_change_tracker.cc",
148 "test_change_tracker.h",
153 "//components/view_manager/public/cpp",
154 "//components/view_manager/public/cpp:common",
155 "//components/view_manager/public/interfaces",
157 "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
158 "//ui/mojo/geometry:interfaces",
166 ":view_manager_unittests",
167 "//components/view_manager/public/cpp/tests:mojo_view_manager_lib_unittests",
171 test("view_manager_unittests") {
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",
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",
201 "//ui/gfx:test_support",
205 if (!is_android) { # TODO(GYP) Enable on Android when osmesa links.
206 deps += [ "//third_party/mesa:osmesa" ]
210 mojo_native_application("apptests") {
211 output_name = "view_manager_apptests"
215 "view_manager_client_apptest.cc",
216 "view_manager_service_apptest.cc",
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",
230 data_deps = [ ":view_manager" ]