Performance histograms for extension content verification
[chromium-blink-merge.git] / mojo / mojo.gyp
blob05c69c2161f582554fea20591e179d3e1223a59a
1 # Copyright 2013 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.
6   'target_defaults': {
7     'conditions': [
8       ['mojo_shell_debug_url != ""', {
9         'defines': [
10           'MOJO_SHELL_DEBUG=1',
11           'MOJO_SHELL_DEBUG_URL="<(mojo_shell_debug_url)"',
12          ],
13       }],
14     ],
15   },
16   'variables': {
17     'chromium_code': 1,
18     'mojo_shell_debug_url%': "",
19   },
20   'includes': [
21     'mojo_apps.gypi',
22     'mojo_examples.gypi',
23     'mojo_public.gypi',
24     'mojo_services.gypi',
25   ],
26   'targets': [
27     {
28       'target_name': 'mojo',
29       'type': 'none',
30       'dependencies': [
31         'mojo_apps_js_unittests',
32         'mojo_compositor_app',
33         'mojo_common_lib',
34         'mojo_common_unittests',
35         'mojo_cpp_bindings',
36         'mojo_geometry_lib',
37         'mojo_html_viewer',
38         'mojo_image_viewer',
39         'mojo_js',
40         'mojo_js_bindings',
41         'mojo_js_unittests',
42         'mojo_launcher',
43         'mojo_message_generator',
44         'mojo_native_viewport_service',
45         'mojo_network_service',
46         'mojo_pepper_container_app',
47         'mojo_profile_service',
48         'mojo_public_test_utils',
49         'mojo_public_bindings_unittests',
50         'mojo_public_environment_unittests',
51         'mojo_public_system_perftests',
52         'mojo_public_system_unittests',
53         'mojo_public_utility_unittests',
54         'mojo_sample_app',
55         'mojo_service_manager',
56         'mojo_service_manager_unittests',
57         'mojo_shell',
58         'mojo_shell_lib',
59         'mojo_shell_tests',
60         'mojo_system',
61         'mojo_system_impl',
62         'mojo_system_unittests',
63         'mojo_test_service',
64         'mojo_utility',
65         'mojo_view_manager_lib',
66         'mojo_view_manager_lib_unittests',
67         'mojo_wget',
68       ],
69       'conditions': [
70         ['use_aura==1', {
71           'dependencies': [
72             'mojo_aura_demo',
73             'mojo_aura_demo_init',
74             'mojo_browser',
75             'mojo_demo_launcher',
76             'mojo_embedded_app',
77             'mojo_nesting_app',
78             'mojo_window_manager',
79             'mojo_view_manager',
80             'mojo_view_manager_unittests',
81           ],
82         }],
83         ['OS == "android"', {
84           'dependencies': [
85             'mojo_bindings_java',
86             'mojo_public_java',
87             'mojo_system_java',
88             'libmojo_system_java',
89             'mojo_test_apk',
90           ],
91         }],
92         ['OS == "linux"', {
93           'dependencies': [
94             'mojo_dbus_echo',
95             'mojo_dbus_echo_service',
96           ],
97         }],
98       ]
99     },
100     {
101       'target_name': 'mojo_external_service_bindings',
102       'type': 'static_library',
103       'sources': [
104         'shell/external_service.mojom',
105       ],
106       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
107       'export_dependent_settings': [
108         'mojo_cpp_bindings',
109       ],
110       'dependencies': [
111         'mojo_cpp_bindings',
112       ],
113     },
114     {
115       'target_name': 'mojo_run_all_unittests',
116       'type': 'static_library',
117       'dependencies': [
118         '../base/base.gyp:base',
119         '../base/base.gyp:test_support_base',
120         '../testing/gtest.gyp:gtest',
121         'mojo_system_impl',
122         'mojo_test_support',
123         'mojo_test_support_impl',
124       ],
125       'sources': [
126         'common/test/run_all_unittests.cc',
127       ],
128     },
129     {
130       'target_name': 'mojo_run_all_perftests',
131       'type': 'static_library',
132       'dependencies': [
133         '../base/base.gyp:test_support_base',
134         'mojo_system_impl',
135         'mojo_test_support',
136         'mojo_test_support_impl',
137       ],
138       'sources': [
139         'common/test/run_all_perftests.cc',
140       ],
141     },
142     {
143       # GN version: //mojo/system
144       'target_name': 'mojo_system_impl',
145       'type': '<(component)',
146       'dependencies': [
147         '../base/base.gyp:base',
148         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
149       ],
150       'defines': [
151         'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
152         'MOJO_SYSTEM_IMPLEMENTATION',
153         'MOJO_USE_SYSTEM_IMPL',
154       ],
155       'sources': [
156         'embedder/channel_init.cc',
157         'embedder/channel_init.h',
158         'embedder/embedder.cc',
159         'embedder/embedder.h',
160         'embedder/platform_channel_pair.cc',
161         'embedder/platform_channel_pair.h',
162         'embedder/platform_channel_pair_posix.cc',
163         'embedder/platform_channel_pair_win.cc',
164         'embedder/platform_channel_utils_posix.cc',
165         'embedder/platform_channel_utils_posix.h',
166         'embedder/platform_handle.cc',
167         'embedder/platform_handle.h',
168         'embedder/platform_handle_utils.h',
169         'embedder/platform_handle_utils_posix.cc',
170         'embedder/platform_handle_utils_win.cc',
171         'embedder/platform_handle_vector.h',
172         'embedder/scoped_platform_handle.h',
173         'system/channel.cc',
174         'system/channel.h',
175         'system/constants.h',
176         'system/core.cc',
177         'system/core.h',
178         'system/data_pipe.cc',
179         'system/data_pipe.h',
180         'system/data_pipe_consumer_dispatcher.cc',
181         'system/data_pipe_consumer_dispatcher.h',
182         'system/data_pipe_producer_dispatcher.cc',
183         'system/data_pipe_producer_dispatcher.h',
184         'system/dispatcher.cc',
185         'system/dispatcher.h',
186         'system/entrypoints.cc',
187         'system/handle_signals_state.h',
188         'system/handle_table.cc',
189         'system/handle_table.h',
190         'system/local_data_pipe.cc',
191         'system/local_data_pipe.h',
192         'system/local_message_pipe_endpoint.cc',
193         'system/local_message_pipe_endpoint.h',
194         'system/mapping_table.cc',
195         'system/mapping_table.h',
196         'system/memory.cc',
197         'system/memory.h',
198         'system/message_in_transit.cc',
199         'system/message_in_transit.h',
200         'system/message_in_transit_queue.cc',
201         'system/message_in_transit_queue.h',
202         'system/message_pipe.cc',
203         'system/message_pipe.h',
204         'system/message_pipe_dispatcher.cc',
205         'system/message_pipe_dispatcher.h',
206         'system/message_pipe_endpoint.cc',
207         'system/message_pipe_endpoint.h',
208         'system/options_validation.h',
209         'system/platform_handle_dispatcher.cc',
210         'system/platform_handle_dispatcher.h',
211         'system/proxy_message_pipe_endpoint.cc',
212         'system/proxy_message_pipe_endpoint.h',
213         'system/raw_channel.cc',
214         'system/raw_channel.h',
215         'system/raw_channel_posix.cc',
216         'system/raw_channel_win.cc',
217         'system/raw_shared_buffer.cc',
218         'system/raw_shared_buffer.h',
219         'system/raw_shared_buffer_posix.cc',
220         'system/raw_shared_buffer_win.cc',
221         'system/shared_buffer_dispatcher.cc',
222         'system/shared_buffer_dispatcher.h',
223         'system/simple_dispatcher.cc',
224         'system/simple_dispatcher.h',
225         'system/transport_data.cc',
226         'system/transport_data.h',
227         'system/waiter.cc',
228         'system/waiter.h',
229         'system/waiter_list.cc',
230         'system/waiter_list.h',
231         # Test-only code:
232         # TODO(vtl): It's a little unfortunate that these end up in the same
233         # component as non-test-only code. In the static build, this code should
234         # hopefully be dead-stripped.
235         'embedder/test_embedder.cc',
236         'embedder/test_embedder.h',
237       ],
238       'all_dependent_settings': {
239         # Ensures that dependent projects import the core functions on Windows.
240         'defines': ['MOJO_USE_SYSTEM_IMPL'],
241       }
242     },
243     {
244       'target_name': 'mojo_system_unittests',
245       'type': 'executable',
246       'dependencies': [
247         '../base/base.gyp:base',
248         '../base/base.gyp:run_all_unittests',
249         '../testing/gtest.gyp:gtest',
250         'mojo_common_test_support',
251         'mojo_system_impl',
252       ],
253       'sources': [
254         'embedder/embedder_unittest.cc',
255         'embedder/platform_channel_pair_posix_unittest.cc',
256         'system/channel_unittest.cc',
257         'system/core_unittest.cc',
258         'system/core_test_base.cc',
259         'system/core_test_base.h',
260         'system/data_pipe_unittest.cc',
261         'system/dispatcher_unittest.cc',
262         'system/local_data_pipe_unittest.cc',
263         'system/memory_unittest.cc',
264         'system/message_pipe_dispatcher_unittest.cc',
265         'system/message_pipe_unittest.cc',
266         'system/multiprocess_message_pipe_unittest.cc',
267         'system/options_validation_unittest.cc',
268         'system/platform_handle_dispatcher_unittest.cc',
269         'system/raw_channel_unittest.cc',
270         'system/raw_shared_buffer_unittest.cc',
271         'system/remote_message_pipe_unittest.cc',
272         'system/shared_buffer_dispatcher_unittest.cc',
273         'system/simple_dispatcher_unittest.cc',
274         'system/test_utils.cc',
275         'system/test_utils.h',
276         'system/waiter_list_unittest.cc',
277         'system/waiter_test_utils.cc',
278         'system/waiter_test_utils.h',
279         'system/waiter_unittest.cc',
280       ],
281     },
282     {
283       'target_name': 'mojo_gles2_impl',
284       'type': '<(component)',
285       'dependencies': [
286         '../base/base.gyp:base',
287         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
288         '../gpu/gpu.gyp:command_buffer_client',
289         '../gpu/gpu.gyp:command_buffer_common',
290         '../gpu/gpu.gyp:gles2_cmd_helper',
291         '../gpu/gpu.gyp:gles2_implementation',
292         'mojo_gles2',
293         'mojo_gles2_bindings',
294         'mojo_environment_chromium',
295         'mojo_system_impl',
296       ],
297       'defines': [
298         'MOJO_GLES2_IMPL_IMPLEMENTATION',
299       ],
300       'sources': [
301         'gles2/command_buffer_client_impl.cc',
302         'gles2/command_buffer_client_impl.h',
303         'gles2/gles2_impl_export.h',
304         'gles2/gles2_support_impl.cc',
305         'gles2/gles2_support_impl.h',
306         'gles2/gles2_context.cc',
307         'gles2/gles2_context.h',
308       ],
309     },
310     {
311       'target_name': 'mojo_test_support_impl',
312       'type': 'static_library',
313       'dependencies': [
314         '../base/base.gyp:base',
315       ],
316       'sources': [
317         'common/test/test_support_impl.cc',
318         'common/test/test_support_impl.h',
319       ],
320     },
321     {
322       # GN version: //mojo/common
323       'target_name': 'mojo_common_lib',
324       'type': '<(component)',
325       'defines': [
326         'MOJO_COMMON_IMPLEMENTATION',
327       ],
328       'dependencies': [
329         '../base/base.gyp:base',
330         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
331         'mojo_system_impl',
332       ],
333       'export_dependent_settings': [
334         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
335         'mojo_system_impl',
336       ],
337       'sources': [
338         'common/common_type_converters.cc',
339         'common/common_type_converters.h',
340         'common/data_pipe_utils.cc',
341         'common/data_pipe_utils.h',
342         'common/handle_watcher.cc',
343         'common/handle_watcher.h',
344         'common/message_pump_mojo.cc',
345         'common/message_pump_mojo.h',
346         'common/message_pump_mojo_handler.h',
347         'common/time_helper.cc',
348         'common/time_helper.h',
349       ],
350     },
351     {
352       'target_name': 'mojo_common_test_support',
353       'type': 'static_library',
354       'dependencies': [
355         '../base/base.gyp:base',
356         '../base/base.gyp:test_support_base',
357         '../testing/gtest.gyp:gtest',
358         'mojo_system_impl',
359       ],
360       'sources': [
361         'common/test/multiprocess_test_helper.cc',
362         'common/test/multiprocess_test_helper.h',
363         'common/test/test_utils.h',
364         'common/test/test_utils_posix.cc',
365         'common/test/test_utils_win.cc',
366       ],
367     },
368     {
369       'target_name': 'mojo_common_unittests',
370       'type': 'executable',
371       'dependencies': [
372         '../base/base.gyp:base',
373         '../base/base.gyp:base_message_loop_tests',
374         '../testing/gtest.gyp:gtest',
375         'mojo_cpp_bindings',
376         'mojo_environment_chromium',
377         'mojo_common_lib',
378         'mojo_common_test_support',
379         'mojo_public_test_utils',
380         'mojo_run_all_unittests',
381       ],
382       'sources': [
383         'common/common_type_converters_unittest.cc',
384         'common/handle_watcher_unittest.cc',
385         'common/message_pump_mojo_unittest.cc',
386         'common/test/multiprocess_test_helper_unittest.cc',
387       ],
388     },
389     {
390       # GN version: //mojo/environment:chromium
391       'target_name': 'mojo_environment_chromium',
392       'type': 'static_library',
393       'dependencies': [
394         'mojo_common_lib',
395         'mojo_environment_chromium_impl',
396       ],
397       'sources': [
398         'environment/environment.cc',
399         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
400         "public/cpp/environment/logging.h",
401         "public/cpp/environment/lib/logging.h",
402       ],
403       'include_dirs': [
404         '..',
405       ],
406       'export_dependent_settings': [
407         'mojo_environment_chromium_impl',
408       ],
409     },
410     {
411       # GN version: //mojo/environment:chromium_impl
412       'target_name': 'mojo_environment_chromium_impl',
413       'type': '<(component)',
414       'defines': [
415         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
416       ],
417       'dependencies': [
418         '../base/base.gyp:base',
419         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
420         'mojo_common_lib'
421       ],
422       'sources': [
423         'environment/default_async_waiter_impl.cc',
424         'environment/default_async_waiter_impl.h',
425         'environment/default_logger_impl.cc',
426         'environment/default_logger_impl.h',
427       ],
428       'include_dirs': [
429         '..',
430       ],
431     },
432     {
433       # GN version: //mojo/service_manager
434       'target_name': 'mojo_service_manager',
435       'type': '<(component)',
436       'defines': [
437         'MOJO_SERVICE_MANAGER_IMPLEMENTATION',
438       ],
439       'dependencies': [
440         '../base/base.gyp:base',
441         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
442         '../net/net.gyp:net',
443         '../url/url.gyp:url_lib',
444         'mojo_common_lib',
445         'mojo_environment_chromium',
446         'mojo_service_provider_bindings',
447         'mojo_system_impl',
448       ],
449       'sources': [
450         'service_manager/background_service_loader.cc',
451         'service_manager/background_service_loader.h',
452         'service_manager/service_loader.h',
453         'service_manager/service_manager.cc',
454         'service_manager/service_manager.h',
455         'service_manager/service_manager_export.h',
456       ],
457       'export_dependent_settings': [
458         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
459         'mojo_service_provider_bindings',
460       ],
461     },
462     {
463       'target_name': 'mojo_spy',
464       'type': 'static_library',
465       'dependencies': [
466         '../base/base.gyp:base',
467         '../base/base.gyp:base_static',
468         '../net/net.gyp:http_server',
469         '../url/url.gyp:url_lib',
470         'mojo_service_manager',
471       ],
472       'sources': [
473         'spy/spy.cc',
474         'spy/spy.h',
475         'spy/websocket_server.cc',
476         'spy/websocket_server.h',
477       ],
478     },
479     {
480       'target_name': 'mojo_shell_lib',
481       'type': 'static_library',
482       'dependencies': [
483         '../base/base.gyp:base',
484         '../base/base.gyp:base_static',
485         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
486         '../net/net.gyp:net',
487         '../url/url.gyp:url_lib',
488         'mojo_application',
489         'mojo_external_service_bindings',
490         'mojo_gles2_impl',
491         'mojo_native_viewport_service',
492         'mojo_network_bindings',
493         'mojo_profile_service',
494         'mojo_service_manager',
495         'mojo_service_provider_bindings',
496         'mojo_spy',
497         'mojo_system_impl',
498       ],
499       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
500       'sources': [
501         'shell/app_child_process.cc',
502         'shell/app_child_process.h',
503         'shell/app_child_process.mojom',
504         'shell/app_child_process_host.cc',
505         'shell/app_child_process_host.h',
506         'shell/child_process.cc',
507         'shell/child_process.h',
508         'shell/child_process_host.cc',
509         'shell/child_process_host.h',
510         'shell/context.cc',
511         'shell/context.h',
512         'shell/dbus_service_loader_linux.cc',
513         'shell/dbus_service_loader_linux.h',
514         'shell/dynamic_service_loader.cc',
515         'shell/dynamic_service_loader.h',
516         'shell/dynamic_service_runner.h',
517         'shell/init.cc',
518         'shell/init.h',
519         'shell/in_process_dynamic_service_runner.cc',
520         'shell/in_process_dynamic_service_runner.h',
521         'shell/keep_alive.cc',
522         'shell/keep_alive.h',
523         'shell/mojo_url_resolver.cc',
524         'shell/mojo_url_resolver.h',
525         'shell/out_of_process_dynamic_service_runner.cc',
526         'shell/out_of_process_dynamic_service_runner.h',
527         'shell/profile_service_loader.cc',
528         'shell/profile_service_loader.h',
529         'shell/run.cc',
530         'shell/run.h',
531         'shell/switches.cc',
532         'shell/switches.h',
533         'shell/task_runners.cc',
534         'shell/task_runners.h',
535         'shell/test_child_process.cc',
536         'shell/test_child_process.h',
537         'shell/view_manager_loader.cc',
538         'shell/view_manager_loader.h',
539       ],
540       'conditions': [
541         ['OS=="linux"', {
542           'dependencies': [
543             '../build/linux/system.gyp:dbus',
544             '../dbus/dbus.gyp:dbus',
545           ],
546         }],
547         ['use_aura==1', {
548           'dependencies': [
549             # These are only necessary as long as we hard code use of ViewManager.
550             '../skia/skia.gyp:skia',
551             'mojo_gles2',
552             'mojo_view_manager',
553             'mojo_view_manager_bindings',
554           ],
555         }, {  # use_aura==0
556           'sources!': [
557             'shell/view_manager_loader.cc',
558             'shell/view_manager_loader.h',
559           ],
560         }],
561       ],
562     },
563     {
564       'target_name': 'mojo_shell_test_support',
565       'type': 'static_library',
566       'dependencies': [
567         '../base/base.gyp:base',
568         '../base/base.gyp:base_static',
569         '../url/url.gyp:url_lib',
570         'mojo_service_manager',
571         'mojo_shell_lib',
572         'mojo_system_impl',
573       ],
574       'sources': [
575         'shell/shell_test_helper.cc',
576         'shell/shell_test_helper.h',
577       ],
578     },
579     {
580       'target_name': 'mojo_shell',
581       'type': 'executable',
582       'dependencies': [
583         '../base/base.gyp:base',
584         '../ui/gl/gl.gyp:gl',
585         '../url/url.gyp:url_lib',
586         'mojo_common_lib',
587         'mojo_environment_chromium',
588         'mojo_service_manager',
589         'mojo_shell_lib',
590         'mojo_system_impl',
591       ],
592       'sources': [
593         'shell/desktop/mojo_main.cc',
594       ],
595     },
596     {
597       'target_name': 'mojo_shell_tests',
598       'type': '<(gtest_target_type)',
599       'dependencies': [
600         '../base/base.gyp:base',
601         '../base/base.gyp:test_support_base',
602         '../testing/gtest.gyp:gtest',
603         # TODO(vtl): We don't currently need this, but I imagine we will soon.
604         # '../ui/gl/gl.gyp:gl',
605         '../url/url.gyp:url_lib',
606         'mojo_common_lib',
607         'mojo_environment_chromium',
608         'mojo_service_manager',
609         'mojo_shell_lib',
610         'mojo_system_impl',
611         'mojo_test_service_bindings',
612       ],
613       'sources': [
614         'shell/child_process_host_unittest.cc',
615         'shell/shell_test_base.cc',
616         'shell/shell_test_base.h',
617         'shell/shell_test_base_unittest.cc',
618         'shell/shell_test_main.cc',
619       ],
620       'conditions': [
621         ['OS == "android"', {
622           'dependencies': [
623             '../testing/android/native_test.gyp:native_test_native_code',
624           ],
625         }],
626       ],
627     },
628     {
629       'target_name': 'mojo_service_manager_unittests',
630       'type': 'executable',
631       'dependencies': [
632         '../base/base.gyp:base',
633         '../testing/gtest.gyp:gtest',
634         '../url/url.gyp:url_lib',
635         'mojo_common_lib',
636         'mojo_cpp_bindings',
637         'mojo_environment_chromium',
638         'mojo_run_all_unittests',
639         'mojo_service_manager',
640         'mojo_application',
641       ],
642       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
643       'sources': [
644         'service_manager/service_manager_unittest.cc',
645         'service_manager/test.mojom',
646       ],
647     },
648     {
649       'target_name': 'mojo_js_bindings_lib',
650       'type': 'static_library',
651       'dependencies': [
652         '../base/base.gyp:base',
653         '../gin/gin.gyp:gin',
654         '../v8/tools/gyp/v8.gyp:v8',
655         'mojo_common_lib',
656       ],
657       'export_dependent_settings': [
658         '../base/base.gyp:base',
659         '../gin/gin.gyp:gin',
660         'mojo_common_lib',
661       ],
662       'sources': [
663         'bindings/js/core.cc',
664         'bindings/js/core.h',
665         'bindings/js/handle.cc',
666         'bindings/js/handle.h',
667         'bindings/js/support.cc',
668         'bindings/js/support.h',
669         'bindings/js/waiting_callback.cc',
670         'bindings/js/waiting_callback.h',
671       ],
672     },
673     {
674       'target_name': 'mojo_js_unittests',
675       'type': 'executable',
676       'dependencies': [
677         '../gin/gin.gyp:gin_test',
678         'mojo_common_test_support',
679         'mojo_js_bindings_lib',
680         'mojo_run_all_unittests',
681         'mojo_public_test_interfaces',
682       ],
683       'sources': [
684         'bindings/js/run_js_tests.cc',
685       ],
686     },
687     {
688       'target_name': 'mojo_message_generator',
689       'type': 'executable',
690       'dependencies': [
691         '../base/base.gyp:base',
692         '../testing/gtest.gyp:gtest',
693         'mojo_common_lib',
694         'mojo_cpp_bindings',
695         'mojo_environment_chromium',
696         'mojo_system_impl',
697       ],
698       'sources': [
699         'tools/message_generator.cc',
700       ],
701     },
702     {
703       'target_name': 'mojo_cc_support',
704       'type': 'static_library',
705       'dependencies': [
706         '../base/base.gyp:base',
707         '../cc/cc.gyp:cc',
708         '../skia/skia.gyp:skia',
709         '../gpu/gpu.gyp:gles2_implementation',
710         'mojo_gles2',
711       ],
712       'sources': [
713         'cc/context_provider_mojo.cc',
714         'cc/context_provider_mojo.h',
715       ],
716     },
717   ],
718   'conditions': [
719     ['OS=="android"', {
720       'targets': [
721         {
722           'target_name': 'mojo_jni_headers',
723           'type': 'none',
724           'dependencies': [
725             'mojo_java_set_jni_headers',
726           ],
727           'sources': [
728             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
729             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
730             'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java',
731             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
732           ],
733           'variables': {
734             'jni_gen_package': 'mojo',
735          },
736           'includes': [ '../build/jni_generator.gypi' ],
737         },
738         {
739           'target_name': 'mojo_system_java',
740           'type': 'none',
741           'dependencies': [
742             '../base/base.gyp:base_java',
743             'mojo_public_java',
744           ],
745           'variables': {
746             'java_in_dir': '<(DEPTH)/mojo/android/system',
747           },
748           'includes': [ '../build/java.gypi' ],
749         },
750         {
751           'target_name': 'libmojo_system_java',
752           'type': 'static_library',
753           'dependencies': [
754             '../base/base.gyp:base',
755             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
756             'mojo_common_lib',
757             'mojo_environment_chromium',
758             'mojo_jni_headers',
759             'mojo_service_provider_bindings',
760             'mojo_shell_lib',
761           ],
762           'sources': [
763             'android/system/core_impl.cc',
764             'android/system/core_impl.h',
765           ],
766         },
767         {
768           'target_name': 'libmojo_java_unittest',
769           'type': 'shared_library',
770           'dependencies': [
771             '../base/base.gyp:base',
772             '../base/base.gyp:test_support_base',
773             'libmojo_system_java',
774             'mojo_jni_headers',
775           ],
776           'defines': [
777             'UNIT_TEST'  # As exported from testing/gtest.gyp:gtest.
778           ],
779           'sources': [
780             'android/javatests/mojo_test_case.cc',
781             'android/javatests/mojo_test_case.h',
782             'android/javatests/init_library.cc',
783           ],
784         },
785         {
786           'target_name': 'mojo_test_apk',
787           'type': 'none',
788           'dependencies': [
789             'mojo_bindings_java',
790             'mojo_public_test_interfaces',
791             'mojo_system_java',
792             '../base/base.gyp:base_java_test_support',
793           ],
794           'variables': {
795             'apk_name': 'MojoTest',
796             'java_in_dir': '<(DEPTH)/mojo/android/javatests',
797             'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
798             'native_lib_target': 'libmojo_java_unittest',
799             'is_test_apk': 1,
800             # Given that this apk tests itself, it needs to bring emma with it
801             # when instrumented.
802             'conditions': [
803               ['emma_coverage != 0', {
804                 'emma_instrument': 1,
805               }],
806             ],
807           },
808           'includes': [ '../build/java_apk.gypi' ],
809         },
810         {
811           'target_name': 'mojo_native_viewport_java',
812           'type': 'none',
813           'dependencies': [
814             '../base/base.gyp:base_java',
815           ],
816           'variables': {
817             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
818           },
819           'includes': [ '../build/java.gypi' ],
820         },
821         {
822           'target_name': 'mojo_java_set_jni_headers',
823           'type': 'none',
824           'variables': {
825             'jni_gen_package': 'mojo',
826             'input_java_class': 'java/util/HashSet.class',
827           },
828           'includes': [ '../build/jar_file_jni_generator.gypi' ],
829         },
830         {
831           'target_name': 'libmojo_shell',
832           'type': 'shared_library',
833           'dependencies': [
834             '../base/base.gyp:base',
835             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
836             '../ui/gfx/gfx.gyp:gfx',
837             '../ui/gfx/gfx.gyp:gfx_geometry',
838             '../ui/gl/gl.gyp:gl',
839             'mojo_common_lib',
840             'mojo_environment_chromium',
841             'mojo_jni_headers',
842             'mojo_service_provider_bindings',
843             'mojo_shell_lib',
844           ],
845           'sources': [
846             'shell/android/library_loader.cc',
847             'shell/android/mojo_main.cc',
848             'shell/android/mojo_main.h',
849           ],
850         },
851         {
852           'target_name': 'mojo_shell_apk',
853           'type': 'none',
854           'dependencies': [
855             '../base/base.gyp:base_java',
856             '../net/net.gyp:net_java',
857             'mojo_native_viewport_java',
858             'libmojo_shell',
859           ],
860           'variables': {
861             'apk_name': 'MojoShell',
862             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
863             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
864             'native_lib_target': 'libmojo_shell',
865           },
866           'includes': [ '../build/java_apk.gypi' ],
867         }
868       ],
869     }],
870     ['OS=="linux"', {
871       'targets': [
872         {
873           'target_name': 'mojo_dbus_service',
874           'type': 'static_library',
875           'dependencies': [
876             '../base/base.gyp:base',
877             '../build/linux/system.gyp:dbus',
878             '../dbus/dbus.gyp:dbus',
879             'mojo_common_lib',
880             'mojo_external_service_bindings',
881             'mojo_application',
882             'mojo_system_impl',
883           ],
884           'sources': [
885             'dbus/dbus_external_service.h',
886             'dbus/dbus_external_service.cc',
887           ],
888         },
889       ],
890     }],
891     ['test_isolation_mode != "noop"', {
892       'targets': [
893         {
894           'target_name': 'mojo_js_unittests_run',
895           'type': 'none',
896           'dependencies': [
897             'mojo_js_unittests',
898           ],
899           'includes': [
900             '../build/isolate.gypi',
901             'mojo_js_unittests.isolate',
902           ],
903           'sources': [
904             'mojo_js_unittests.isolate',
905           ],
906         },
907       ],
908     }],
909     ['use_aura==1', {
910       'targets': [
911         {
912           'target_name': 'mojo_aura_support',
913           'type': 'static_library',
914           'dependencies': [
915             '../cc/cc.gyp:cc',
916             '../ui/aura/aura.gyp:aura',
917             '../ui/compositor/compositor.gyp:compositor',
918             '../ui/events/events.gyp:events',
919             '../ui/events/events.gyp:events_base',
920             '../ui/gl/gl.gyp:gl',
921             '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
922             'mojo_cc_support',
923             'mojo_gles2',
924             'mojo_native_viewport_bindings',
925           ],
926           'sources': [
927             'aura/aura_init.cc',
928             'aura/aura_init.h',
929             'aura/context_factory_mojo.cc',
930             'aura/context_factory_mojo.h',
931             'aura/screen_mojo.cc',
932             'aura/screen_mojo.h',
933             'aura/window_tree_host_mojo.cc',
934             'aura/window_tree_host_mojo.h',
935             'aura/window_tree_host_mojo_delegate.h',
936           ],
937         },
938         {
939           'target_name': 'mojo_views_support',
940           'type': 'static_library',
941           'dependencies': [
942             '../base/base.gyp:base',
943             '../base/base.gyp:base_i18n',
944             '../skia/skia.gyp:skia',
945             '../skia/skia.gyp:skia',
946             '../third_party/icu/icu.gyp:icui18n',
947             '../third_party/icu/icu.gyp:icuuc',
948             '../ui/aura/aura.gyp:aura',
949             '../ui/base/ui_base.gyp:ui_base',
950             '../ui/views/views.gyp:views',
951             '../ui/wm/wm.gyp:wm',
952             'mojo_aura_support',
953           ],
954           'sources': [
955             'views/native_widget_view_manager.cc',
956             'views/native_widget_view_manager.h',
957             'views/views_init.cc',
958             'views/views_init.h',
959           ],
960         },
961       ],
962     }],
963   ],