Use networkingPrivate.startConnect
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blob9f73e5de8e013239c143786866a5ee9e873a1142
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/logging.h",
124         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
125       ],
126       'include_dirs': [
127         '..',
128         '../third_party/mojo/src',
129       ],
130       'direct_dependent_settings': {
131         'include_dirs': [
132           '../third_party/mojo/src',
133         ],
134       },
135       'export_dependent_settings': [
136         'mojo_environment_chromium_impl',
137       ],
138     },
139     {
140       # GN version: //mojo/environment:chromium_impl
141       'target_name': 'mojo_environment_chromium_impl',
142       'type': '<(component)',
143       'defines': [
144         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
145       ],
146       'dependencies': [
147         '../base/base.gyp:base',
148         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
149         'mojo_common_lib',
150         '<(mojo_system_for_component)',
151       ],
152       'sources': [
153         'environment/default_async_waiter_impl.cc',
154         'environment/default_async_waiter_impl.h',
155         'environment/default_logger_impl.cc',
156         'environment/default_logger_impl.h',
157         'environment/default_run_loop_impl.cc',
158         'environment/default_run_loop_impl.h',
159       ],
160       'include_dirs': [
161         '..',
162         '../third_party/mojo/src',
163       ],
164       'direct_dependent_settings': {
165         'include_dirs': [
166           '../third_party/mojo/src',
167         ],
168       },
169     },
170     {
171      # GN version: //mojo/application
172      'target_name': 'mojo_application_chromium',
173      'type': 'static_library',
174      'sources': [
175        'application/application_runner_chromium.cc',
176        'application/application_runner_chromium.h',
177       ],
178       'dependencies': [
179         'mojo_common_lib',
180         'mojo_environment_chromium',
181         '../third_party/mojo/mojo_public.gyp:mojo_application_base',
182        ],
183       'export_dependent_settings': [
184         '../third_party/mojo/mojo_public.gyp:mojo_application_base',
185        ],
186     },
187   ],
188   'conditions': [
189     ['OS=="android"', {
190       'targets': [
191         {
192           'target_name': 'mojo_jni_headers',
193           'type': 'none',
194           'dependencies': [
195             'mojo_java_set_jni_headers',
196           ],
197           'sources': [
198             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
199             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
200             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
201           ],
202           'variables': {
203             'jni_gen_package': 'mojo',
204           },
205           'includes': [ '../build/jni_generator.gypi' ],
206         },
207         {
208           'target_name': 'libmojo_system_java',
209           'type': 'static_library',
210           'dependencies': [
211             '../base/base.gyp:base',
212             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
213             'mojo_common_lib',
214             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
215             'mojo_environment_chromium',
216             'mojo_jni_headers',
217           ],
218           'sources': [
219             'android/system/core_impl.cc',
220             'android/system/core_impl.h',
221           ],
222         },
223         {
224           'target_name': 'mojo_java_set_jni_headers',
225           'type': 'none',
226           'variables': {
227             'jni_gen_package': 'mojo',
228             'input_java_class': 'java/util/HashSet.class',
229           },
230           'includes': [ '../build/jar_file_jni_generator.gypi' ],
231         },
232         {
233           'target_name': 'mojo_system_java',
234           'type': 'none',
235           'dependencies': [
236             '../base/base.gyp:base_java',
237             'libmojo_system_java',
238             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
239           ],
240           'variables': {
241             'java_in_dir': '<(DEPTH)/mojo/android/system',
242           },
243           'includes': [ '../build/java.gypi' ],
244         },
245       ]
246     }]
247   ]