Remove deprecated TabObserver.loadUrl(,url,)
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blobc0d4bac6b518fc7a568b495ca1ade1cdff4434ba
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         '../url/url.gyp:url_lib',
48         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
49         '<(mojo_system_for_component)',
50       ],
51       'export_dependent_settings': [
52         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
53       ],
54       'sources': [
55         'common/common_type_converters.cc',
56         'common/common_type_converters.h',
57         'common/data_pipe_utils.cc',
58         'common/data_pipe_utils.h',
59         'common/handle_watcher.cc',
60         'common/handle_watcher.h',
61         'common/message_pump_mojo.cc',
62         'common/message_pump_mojo.h',
63         'common/message_pump_mojo_handler.h',
64         'common/time_helper.cc',
65         'common/time_helper.h',
66       ],
67     },
68     {
69       # GN version: //mojo/common:mojo_common_unittests
70       'target_name': 'mojo_common_unittests',
71       'type': 'executable',
72       'dependencies': [
73         '../base/base.gyp:base',
74         '../base/base.gyp:test_support_base',
75         '../base/base.gyp:base_message_loop_tests',
76         '../testing/gtest.gyp:gtest',
77         '../url/url.gyp:url_lib',
78         'mojo_common_lib',
79         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
80         '../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
81         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
82         'mojo_environment_chromium',
83         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
84         '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
85       ],
86       'sources': [
87         'common/common_type_converters_unittest.cc',
88         'common/handle_watcher_unittest.cc',
89         'common/message_pump_mojo_unittest.cc',
90       ],
91     },
92     {
93       # GN version: //mojo/environment:chromium
94       'target_name': 'mojo_environment_chromium',
95       'type': 'static_library',
96       'dependencies': [
97         'mojo_environment_chromium_impl',
98         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
99       ],
100       'sources': [
101         'environment/environment.cc',
102         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
103         "../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
104         "../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
105         "../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
106         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
107       ],
108       'include_dirs': [
109         '..',
110         '../third_party/mojo/src',
111       ],
112       'direct_dependent_settings': {
113         'include_dirs': [
114           '../third_party/mojo/src',
115         ],
116       },
117       'export_dependent_settings': [
118         'mojo_environment_chromium_impl',
119       ],
120     },
121     {
122       # GN version: //mojo/environment:chromium_impl
123       'target_name': 'mojo_environment_chromium_impl',
124       'type': '<(component)',
125       'defines': [
126         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
127       ],
128       'dependencies': [
129         '../base/base.gyp:base',
130         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
131         'mojo_common_lib',
132         '<(mojo_system_for_component)',
133       ],
134       'sources': [
135         'environment/default_async_waiter_impl.cc',
136         'environment/default_async_waiter_impl.h',
137         'environment/default_logger_impl.cc',
138         'environment/default_logger_impl.h',
139         'environment/default_run_loop_impl.cc',
140         'environment/default_run_loop_impl.h',
141       ],
142       'include_dirs': [
143         '..',
144         '../third_party/mojo/src',
145       ],
146       'direct_dependent_settings': {
147         'include_dirs': [
148           '../third_party/mojo/src',
149         ],
150       },
151     },
152     {
153      # GN version: //mojo/application
154      'target_name': 'mojo_application_chromium',
155      'type': 'static_library',
156      'sources': [
157        'application/application_runner_chromium.cc',
158        'application/application_runner_chromium.h',
159       ],
160       'dependencies': [
161         'mojo_common_lib',
162         'mojo_environment_chromium',
163         '../third_party/mojo/mojo_public.gyp:mojo_application_base',
164        ],
165       'export_dependent_settings': [
166         '../third_party/mojo/mojo_public.gyp:mojo_application_base',
167        ],
168     },
169   ],
170   'conditions': [
171     ['OS=="android"', {
172       'targets': [
173         {
174           'target_name': 'mojo_jni_headers',
175           'type': 'none',
176           'dependencies': [
177             'mojo_java_set_jni_headers',
178           ],
179           'sources': [
180             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
181             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
182             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
183           ],
184           'variables': {
185             'jni_gen_package': 'mojo',
186           },
187           'includes': [ '../build/jni_generator.gypi' ],
188         },
189         {
190           'target_name': 'libmojo_system_java',
191           'type': 'static_library',
192           'dependencies': [
193             '../base/base.gyp:base',
194             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
195             'mojo_common_lib',
196             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
197             'mojo_environment_chromium',
198             'mojo_jni_headers',
199           ],
200           'sources': [
201             'android/system/core_impl.cc',
202             'android/system/core_impl.h',
203           ],
204         },
205         {
206           'target_name': 'mojo_java_set_jni_headers',
207           'type': 'none',
208           'variables': {
209             'jni_gen_package': 'mojo',
210             'input_java_class': 'java/util/HashSet.class',
211           },
212           'includes': [ '../build/jar_file_jni_generator.gypi' ],
213         },
214         {
215           'target_name': 'mojo_system_java',
216           'type': 'none',
217           'dependencies': [
218             '../base/base.gyp:base_java',
219             'libmojo_system_java',
220             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
221           ],
222           'variables': {
223             'java_in_dir': '<(DEPTH)/mojo/android/system',
224           },
225           'includes': [ '../build/java.gypi' ],
226         },
227       ]
228     }]
229   ]