Handle re-issued cards in unmasking prompt.
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blobb514cd5d24ea41fe9d9d24e81e6967055c344134
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 # Essential components (and their tests) that are needed to build
6 # Chrome should be here.  Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
9   'includes': [
10     '../third_party/mojo/mojo_variables.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'mojo_base',
15       'type': 'none',
16       'dependencies': [
17         # NOTE: If adding a new dependency here, please consider whether it
18         # should also be added to the list of Mojo-related dependencies of
19         # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
20         # target on iOS due to the presence of the js targets, which cause v8
21         # to be built.
22         'mojo_common_lib',
23         'mojo_common_unittests',
24       ],
25       'conditions': [
26         ['OS == "android"', {
27           'dependencies': [
28             '../third_party/mojo/mojo_public.gyp:mojo_bindings_java',
29             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
30           ],
31         }],
32       ]
33     },
34     {
35       'target_name': 'mojo_none',
36       'type': 'none',
37     },
38     {
39       # GN version: //mojo/common
40       'target_name': 'mojo_common_lib',
41       'type': '<(component)',
42       'defines': [
43         'MOJO_COMMON_IMPLEMENTATION',
44       ],
45       'dependencies': [
46         '../base/base.gyp:base',
47         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
48         '<(mojo_system_for_component)',
49       ],
50       'export_dependent_settings': [
51         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
52       ],
53       'sources': [
54         'common/common_type_converters.cc',
55         'common/common_type_converters.h',
56         'common/data_pipe_utils.cc',
57         'common/data_pipe_utils.h',
58         'common/handle_watcher.cc',
59         'common/handle_watcher.h',
60         'common/message_pump_mojo.cc',
61         'common/message_pump_mojo.h',
62         'common/message_pump_mojo_handler.h',
63         'common/time_helper.cc',
64         'common/time_helper.h',
65       ],
66     },
67     {
68       # GN version: //mojo/common:url_type_converters
69       'target_name': 'mojo_url_type_converters',
70       'type': 'static_library',
71       'dependencies': [
72         '../base/base.gyp:base',
73         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
74         '../url/url.gyp:url_lib',
75         '<(mojo_system_for_component)',
76       ],
77       'export_dependent_settings': [
78         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
79       ],
80       'sources': [
81         'common/url_type_converters.cc',
82         'common/url_type_converters.h',
83       ],
84     },
85     {
86       # GN version: //mojo/common:mojo_common_unittests
87       'target_name': 'mojo_common_unittests',
88       'type': 'executable',
89       'dependencies': [
90         '../base/base.gyp:base',
91         '../base/base.gyp:test_support_base',
92         '../base/base.gyp:base_message_loop_tests',
93         '../testing/gtest.gyp:gtest',
94         '../url/url.gyp:url_lib',
95         'mojo_common_lib',
96         'mojo_url_type_converters',
97         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
98         '../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
99         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
100         'mojo_environment_chromium',
101         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
102         '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
103       ],
104       'sources': [
105         'common/common_type_converters_unittest.cc',
106         'common/handle_watcher_unittest.cc',
107         'common/message_pump_mojo_unittest.cc',
108       ],
109     },
110     {
111       # GN version: //mojo/environment:chromium
112       'target_name': 'mojo_environment_chromium',
113       'type': 'static_library',
114       'dependencies': [
115         'mojo_environment_chromium_impl',
116         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
117       ],
118       'sources': [
119         'environment/environment.cc',
120         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
121         "../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
122         "../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
123         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
124         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
125         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
126         "../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
127         "../third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h",
128       ],
129       'include_dirs': [
130         '..',
131         '../third_party/mojo/src',
132       ],
133       'direct_dependent_settings': {
134         'include_dirs': [
135           '../third_party/mojo/src',
136         ],
137       },
138       'export_dependent_settings': [
139         'mojo_environment_chromium_impl',
140       ],
141     },
142     {
143       # GN version: //mojo/environment:chromium_impl
144       'target_name': 'mojo_environment_chromium_impl',
145       'type': '<(component)',
146       'defines': [
147         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
148       ],
149       'dependencies': [
150         '../base/base.gyp:base',
151         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
152         'mojo_common_lib',
153         '<(mojo_system_for_component)',
154       ],
155       'sources': [
156         'environment/default_async_waiter_impl.cc',
157         'environment/default_async_waiter_impl.h',
158         'environment/default_logger_impl.cc',
159         'environment/default_logger_impl.h',
160         'environment/default_run_loop_impl.cc',
161         'environment/default_run_loop_impl.h',
162         'environment/default_task_tracker_impl.cc',
163         'environment/default_task_tracker_impl.h',
164       ],
165       'include_dirs': [
166         '..',
167         '../third_party/mojo/src',
168       ],
169       'direct_dependent_settings': {
170         'include_dirs': [
171           '../third_party/mojo/src',
172         ],
173       },
174     },
175     {
176      # GN version: //mojo/application
177      'target_name': 'mojo_application_chromium',
178      'type': 'static_library',
179      'sources': [
180        'application/application_runner_chromium.cc',
181        'application/application_runner_chromium.h',
182       ],
183       'dependencies': [
184         'mojo_application_base',
185         'mojo_common_lib',
186         'mojo_environment_chromium',
187        ],
188       'export_dependent_settings': [
189         'mojo_application_base',
190        ],
191     },
192     {
193       'target_name': 'mojo_application_bindings_mojom',
194       'type': 'none',
195       'variables': {
196         'mojom_files': [
197           'application/public/interfaces/application.mojom',
198           'application/public/interfaces/service_provider.mojom',
199           'application/public/interfaces/shell.mojom',
200         ],
201       },
202       'includes': [ '../third_party/mojo/mojom_bindings_generator_explicit.gypi' ],
203     },
204     {
205       # GN version: //mojo/application/public/cpp
206       'target_name': 'mojo_application_base',
207       'type': 'static_library',
208       'sources': [
209         'application/public/cpp/application_connection.h',
210         'application/public/cpp/application_delegate.h',
211         'application/public/cpp/application_impl.h',
212         'application/public/cpp/connect.h',
213         'application/public/cpp/interface_factory.h',
214         'application/public/cpp/interface_factory_impl.h',
215         'application/public/cpp/lib/application_connection.cc',
216         'application/public/cpp/lib/application_delegate.cc',
217         'application/public/cpp/lib/application_impl.cc',
218         'application/public/cpp/lib/interface_factory_connector.h',
219         'application/public/cpp/lib/service_connector_registry.cc',
220         'application/public/cpp/lib/service_connector_registry.h',
221         'application/public/cpp/lib/service_provider_impl.cc',
222         'application/public/cpp/lib/service_registry.cc',
223         'application/public/cpp/lib/service_registry.h',
224         'application/public/cpp/service_connector.h',
225         'application/public/cpp/service_provider_impl.h',
226       ],
227       'dependencies': [
228         'mojo_application_bindings',
229       ],
230       'export_dependent_settings': [
231         'mojo_application_bindings',
232       ],
233     },
234     {
235       # GN version: //mojo/application/public/cpp:standalone
236       'target_name': 'mojo_application_standalone',
237       'type': 'static_library',
238       'sources': [
239         'application/public/cpp/lib/application_runner.cc',
240         'application/public/cpp/application_runner.h',
241       ],
242       'dependencies': [
243         'mojo_application_base',
244         '../third_party/mojo/mojo_public.gyp:mojo_environment_standalone',
245       ],
246       'export_dependent_settings': [
247         'mojo_application_base',
248       ],
249     },
250     {
251       # GN version: //mojo/public/interfaces/application:application
252       'target_name': 'mojo_application_bindings',
253       'type': 'static_library',
254       'dependencies': [
255         'mojo_application_bindings_mojom',
256         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
257       ],
258       'export_dependent_settings': [
259         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
260       ],
261     },
262     {
263       # GN version: //mojo/application/public/cpp/tests
264       'target_name': 'mojo_public_application_unittests',
265       'type': 'executable',
266       'dependencies': [
267         'mojo_application_standalone',
268         '../base/base.gyp:base',
269         '../testing/gtest.gyp:gtest',
270         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
271         '../third_party/mojo/mojo_public.gyp:mojo_utility',
272         '../third_party/mojo/mojo_public.gyp:mojo_environment_standalone',
273       ],
274       'sources': [
275         'application/public/cpp/tests/service_registry_unittest.cc',
276       ],
277     },
278   ],
279   'conditions': [
280     ['OS=="android"', {
281       'targets': [
282         {
283           'target_name': 'mojo_jni_headers',
284           'type': 'none',
285           'dependencies': [
286             'mojo_java_set_jni_headers',
287           ],
288           'sources': [
289             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
290             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
291             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
292           ],
293           'variables': {
294             'jni_gen_package': 'mojo',
295           },
296           'includes': [ '../build/jni_generator.gypi' ],
297         },
298         {
299           'target_name': 'libmojo_system_java',
300           'type': 'static_library',
301           'dependencies': [
302             '../base/base.gyp:base',
303             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
304             'mojo_common_lib',
305             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
306             'mojo_environment_chromium',
307             'mojo_jni_headers',
308           ],
309           'sources': [
310             'android/system/core_impl.cc',
311             'android/system/core_impl.h',
312           ],
313         },
314         {
315           'target_name': 'mojo_java_set_jni_headers',
316           'type': 'none',
317           'variables': {
318             'jni_gen_package': 'mojo',
319             'input_java_class': 'java/util/HashSet.class',
320           },
321           'includes': [ '../build/jar_file_jni_generator.gypi' ],
322         },
323         {
324           'target_name': 'mojo_system_java',
325           'type': 'none',
326           'dependencies': [
327             '../base/base.gyp:base_java',
328             'libmojo_system_java',
329             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
330           ],
331           'variables': {
332             'java_in_dir': '<(DEPTH)/mojo/android/system',
333           },
334           'includes': [ '../build/java.gypi' ],
335         },
336       ]
337     }]
338   ]