Delete historical data usage from store when user clears data usage.
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blob3187a98109b8a0dce387c397e63d1260e5458e09
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/message_pump
40       'target_name': 'mojo_message_pump_lib',
41       'type': '<(component)',
42       'defines': [
43         'MOJO_MESSAGE_PUMP_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         'message_pump/handle_watcher.cc',
55         'message_pump/handle_watcher.h',
56         'message_pump/message_pump_mojo.cc',
57         'message_pump/message_pump_mojo.h',
58         'message_pump/message_pump_mojo_handler.h',
59         'message_pump/time_helper.cc',
60         'message_pump/time_helper.h',
61       ],
62     },
63     {
64       # GN version: //mojo/common
65       'target_name': 'mojo_common_lib',
66       'type': '<(component)',
67       'defines': [
68         'MOJO_COMMON_IMPLEMENTATION',
69       ],
70       'dependencies': [
71         '../base/base.gyp:base',
72         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
73         '<(mojo_system_for_component)',
74       ],
75       'export_dependent_settings': [
76         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
77       ],
78       'sources': [
79         'common/common_type_converters.cc',
80         'common/common_type_converters.h',
81         'common/data_pipe_file_utils.cc',
82         'common/data_pipe_utils.cc',
83         'common/data_pipe_utils.h',
84       ],
85     },
86     {
87       # GN version: //mojo/common:url_type_converters
88       'target_name': 'mojo_url_type_converters',
89       'type': 'static_library',
90       'dependencies': [
91         '../base/base.gyp:base',
92         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
93         '../url/url.gyp:url_lib',
94         '<(mojo_system_for_component)',
95       ],
96       'export_dependent_settings': [
97         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
98       ],
99       'sources': [
100         'common/url_type_converters.cc',
101         'common/url_type_converters.h',
102       ],
103     },
104     {
105       # GN version: //mojo/converters/geometry
106       'target_name': 'mojo_geometry_lib',
107       'type': '<(component)',
108       'defines': [
109         'MOJO_GEOMETRY_IMPLEMENTATION',
110       ],
111       'dependencies': [
112         '../ui/mojo/geometry/mojo_bindings.gyp:mojo_geometry_bindings',
113         '../ui/gfx/gfx.gyp:gfx_geometry',
114         'mojo_environment_chromium',
115         '<(mojo_system_for_component)',
116       ],
117       'sources': [
118         'converters/geometry/geometry_type_converters.cc',
119         'converters/geometry/geometry_type_converters.h',
120         'converters/geometry/mojo_geometry_export.h',
121       ],
122     },
123     {
124       # GN version: //mojo/common:mojo_common_unittests
125       'target_name': 'mojo_common_unittests',
126       'type': 'executable',
127       'dependencies': [
128         '../base/base.gyp:base',
129         '../base/base.gyp:test_support_base',
130         '../base/base.gyp:base_message_loop_tests',
131         '../testing/gtest.gyp:gtest',
132         '../url/url.gyp:url_lib',
133         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
134         '../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
135         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
136         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
137         '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
138         'mojo_common_lib',
139         'mojo_environment_chromium',
140         'mojo_message_pump_lib',
141         'mojo_url_type_converters',
142       ],
143       'sources': [
144         'common/common_type_converters_unittest.cc',
145         'message_pump/handle_watcher_unittest.cc',
146         'message_pump/message_pump_mojo_unittest.cc',
147       ],
148     },
149     {
150       # GN version: //mojo/environment:chromium
151       'target_name': 'mojo_environment_chromium',
152       'type': 'static_library',
153       'dependencies': [
154         'mojo_environment_chromium_impl',
155         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
156       ],
157       'sources': [
158         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
159         "../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
160         "../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
161         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
162         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
163         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
164         "../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
165         "../third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h",
166         'environment/environment.cc',
167       ],
168       'include_dirs': [
169         '..',
170         '../third_party/mojo/src',
171       ],
172       'direct_dependent_settings': {
173         'include_dirs': [
174           '../third_party/mojo/src',
175         ],
176       },
177       'export_dependent_settings': [
178         'mojo_environment_chromium_impl',
179       ],
180     },
181     {
182       # GN version: //mojo/environment:chromium_impl
183       'target_name': 'mojo_environment_chromium_impl',
184       'type': '<(component)',
185       'defines': [
186         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
187       ],
188       'dependencies': [
189         '../base/base.gyp:base',
190         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
191         'mojo_message_pump_lib',
192         '<(mojo_system_for_component)',
193       ],
194       'sources': [
195         'environment/default_async_waiter_impl.cc',
196         'environment/default_async_waiter_impl.h',
197         'environment/default_logger_impl.cc',
198         'environment/default_logger_impl.h',
199         'environment/default_run_loop_impl.cc',
200         'environment/default_run_loop_impl.h',
201         'environment/default_task_tracker_impl.cc',
202         'environment/default_task_tracker_impl.h',
203       ],
204       'include_dirs': [
205         '..',
206         '../third_party/mojo/src',
207       ],
208       'direct_dependent_settings': {
209         'include_dirs': [
210           '../third_party/mojo/src',
211         ],
212       },
213     },
214     {
215       'target_name': 'mojo_application_bindings_mojom',
216       'type': 'none',
217       'variables': {
218         'mojom_files': [
219           'application/public/interfaces/application.mojom',
220           'application/public/interfaces/content_handler.mojom',
221           'application/public/interfaces/service_provider.mojom',
222           'application/public/interfaces/shell.mojom',
223         ],
224       },
225       'dependencies': [
226         'mojo_services.gyp:network_service_bindings_generation',
227       ],
228       'export_dependent_settings': [
229         'mojo_services.gyp:network_service_bindings_generation',
230       ],
231       'includes': [ '../third_party/mojo/mojom_bindings_generator_explicit.gypi' ],
232     },
233     {
234       # GN version: //mojo/application/public/cpp
235       'target_name': 'mojo_application_base',
236       'type': 'static_library',
237       'sources': [
238         'application/public/cpp/app_lifetime_helper.h',
239         'application/public/cpp/application_connection.h',
240         'application/public/cpp/application_delegate.h',
241         'application/public/cpp/application_impl.h',
242         'application/public/cpp/application_runner.h',
243         'application/public/cpp/connect.h',
244         'application/public/cpp/interface_factory.h',
245         'application/public/cpp/interface_factory_impl.h',
246         'application/public/cpp/lib/app_lifetime_helper.cc',
247         'application/public/cpp/lib/application_delegate.cc',
248         'application/public/cpp/lib/application_impl.cc',
249         'application/public/cpp/lib/application_runner.cc',
250         'application/public/cpp/lib/interface_factory_connector.h',
251         'application/public/cpp/lib/service_connector_registry.cc',
252         'application/public/cpp/lib/service_connector_registry.h',
253         'application/public/cpp/lib/service_provider_impl.cc',
254         'application/public/cpp/lib/service_registry.cc',
255         'application/public/cpp/lib/service_registry.h',
256         'application/public/cpp/service_connector.h',
257         'application/public/cpp/service_provider_impl.h',
258       ],
259       'dependencies': [
260         'mojo_application_bindings',
261         'mojo_message_pump_lib',
262       ],
263     },
264     {
265       # GN version: //mojo/public/interfaces/application:application
266       'target_name': 'mojo_application_bindings',
267       'type': 'static_library',
268       'dependencies': [
269         'mojo_application_bindings_mojom',
270         'mojo_services.gyp:network_service_bindings_lib',
271         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
272       ],
273       'export_dependent_settings': [
274         'mojo_services.gyp:network_service_bindings_lib',
275       ],
276     },
277     {
278       # GN version: //mojo/test:test_support
279       'target_name': 'mojo_test_support',
280       'type': 'static_library',
281       'dependencies': [
282         '../base/base.gyp:base',
283       ],
284       'sources': [
285         'test/test_utils.h',
286         'test/test_utils_posix.cc',
287         'test/test_utils_win.cc',
288       ],
289     },
290     {
291       # GN version: //mojo/application/public/cpp/tests
292       'target_name': 'mojo_public_application_unittests',
293       'type': 'executable',
294       'dependencies': [
295         'mojo_application_base',
296         '../base/base.gyp:base',
297         '../testing/gtest.gyp:gtest',
298         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
299         '../third_party/mojo/mojo_public.gyp:mojo_utility',
300         '../third_party/mojo/mojo_public.gyp:mojo_environment_standalone',
301       ],
302       'sources': [
303         'application/public/cpp/tests/service_registry_unittest.cc',
304       ],
305     },
306   ],
307   'conditions': [
308     ['OS=="android"', {
309       'targets': [
310         {
311           'target_name': 'mojo_jni_headers',
312           'type': 'none',
313           'dependencies': [
314             'mojo_java_set_jni_headers',
315           ],
316           'sources': [
317             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
318             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
319             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
320           ],
321           'variables': {
322             'jni_gen_package': 'mojo',
323           },
324           'includes': [ '../build/jni_generator.gypi' ],
325         },
326         {
327           'target_name': 'libmojo_system_java',
328           'type': 'static_library',
329           'dependencies': [
330             '../base/base.gyp:base',
331             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
332             'mojo_common_lib',
333             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
334             'mojo_environment_chromium',
335             'mojo_jni_headers',
336           ],
337           'sources': [
338             'android/system/core_impl.cc',
339             'android/system/core_impl.h',
340           ],
341         },
342         {
343           'target_name': 'mojo_java_set_jni_headers',
344           'type': 'none',
345           'variables': {
346             'jni_gen_package': 'mojo',
347             'input_java_class': 'java/util/HashSet.class',
348           },
349           'includes': [ '../build/jar_file_jni_generator.gypi' ],
350         },
351         {
352           'target_name': 'mojo_system_java',
353           'type': 'none',
354           'dependencies': [
355             '../base/base.gyp:base_java',
356             'libmojo_system_java',
357             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
358           ],
359           'variables': {
360             'java_in_dir': '<(DEPTH)/mojo/android/system',
361           },
362           'includes': [ '../build/java.gypi' ],
363         },
364       ],
365     }],
366     ['test_isolation_mode != "noop"', {
367       'targets': [
368         {
369           'target_name': 'mojo_common_unittests_run',
370           'type': 'none',
371           'dependencies': [
372             'mojo_common_unittests',
373           ],
374           'includes': [
375             '../build/isolate.gypi',
376           ],
377           'sources': [
378             'mojo_common_unittests.isolate',
379           ],
380         },
381       ],
382     }],
383   ]