Remove the RenderProcessHost observer and attach the WebContentsObserver earlier...
[chromium-blink-merge.git] / mojo / mojo.gyp
blob222522459576073a2562070f519d8d8c088102f7
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   'includes': [
17     'mojo_apps.gypi',
18     'mojo_examples.gypi',
19     'mojo_services.gypi',
20     'mojo_variables.gypi',
21   ],
22   'targets': [
23     {
24       # GN version: //mojo
25       'target_name': 'mojo',
26       'type': 'none',
27       'dependencies': [
28         'edk/mojo_edk.gyp:mojo_edk',
29         'mojo_application_manager',
30         'mojo_application_manager_unittests',
31         'mojo_apps_js_unittests',
32         'mojo_base.gyp:mojo_base',
33         'mojo_clipboard',
34         'mojo_clipboard_unittests',
35         'mojo_compositor_app',
36         'mojo_content_handler_demo',
37         'mojo_echo_client',
38         'mojo_echo_service',
39         'mojo_example_apptests',
40         'mojo_example_service',
41         'mojo_geometry_lib',
42         'mojo_html_viewer',
43         'mojo_input_events_lib',
44         'mojo_js_content_handler',
45         'mojo_js_standalone',
46         'mojo_js_unittests',
47         'mojo_native_viewport_service',
48         'mojo_network_service',
49         'mojo_pepper_container_app',
50         'mojo_png_viewer',
51         'mojo_sample_app',
52         'mojo_shell',
53         'mojo_shell_lib',
54         'mojo_shell_tests',
55         'mojo_surfaces_app',
56         'mojo_surfaces_app',
57         'mojo_surfaces_child_app',
58         'mojo_surfaces_child_gl_app',
59         'mojo_surfaces_lib',
60         'mojo_surfaces_lib_unittests',
61         'mojo_surfaces_service',
62         'mojo_test_app',
63         'mojo_test_request_tracker_app',
64         'mojo_view_manager_lib_unittests',
65         'mojo_wget',
66         'services/public/mojo_services_public.gyp:mojo_services_public',
67         'public/mojo_public.gyp:mojo_public',
68       ],
69       'conditions': [
70         ['use_aura==1', {
71           'dependencies': [
72             'mojo_aura_demo',
73             'mojo_aura_demo_init',
74             'mojo_browser',
75             'mojo_core_window_manager',
76             'mojo_core_window_manager_unittests',
77             'mojo_demo_launcher',
78             'mojo_embedded_app',
79             'mojo_keyboard',
80             'mojo_media_viewer',
81             'mojo_nesting_app',
82             'mojo_view_manager',
83             'mojo_view_manager_unittests',
84             'mojo_window_manager',
85             'mojo_wm_flow_app',
86             'mojo_wm_flow_embedded',
87             'mojo_wm_flow_init',
88             'mojo_wm_flow_wm',
89           ],
90         }],
91         ['OS == "linux"', {
92           'dependencies': [
93             'mojo_external_application_tests',
94           ],
95         }],
96         ['component != "shared_library" and OS == "linux"', {
97           'dependencies': [
98             'mojo_python_bindings',
99             'mojo_python_embedder',
100             'mojo_python_system',
101             'mojo_python',
102           ],
103         }],
104       ]
105     },
106     {
107       # GN version: //mojo/shell:external_service_bindings
108       'target_name': 'mojo_external_service_bindings',
109       'type': 'static_library',
110       'sources': [
111         'shell/external_service.mojom',
112       ],
113       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
114       'export_dependent_settings': [
115         'public/mojo_public.gyp:mojo_cpp_bindings',
116       ],
117       'dependencies': [
118         'public/mojo_public.gyp:mojo_cpp_bindings',
119       ],
120     },
121     {
122       # GN version: //mojo/spy
123       'target_name': 'mojo_spy',
124       'type': 'static_library',
125       'dependencies': [
126         '../base/base.gyp:base',
127         '../net/net.gyp:http_server',
128         '../url/url.gyp:url_lib',
129         'mojo_application_manager',
130       ],
131       'variables': {
132         'mojom_base_output_dir': 'mojo',
133       },
134       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
135       'sources': [
136         'spy/public/spy.mojom',
137         'spy/common.h',
138         'spy/spy.cc',
139         'spy/spy.h',
140         'spy/spy_server_impl.h',
141         'spy/spy_server_impl.cc',
142         'spy/websocket_server.cc',
143         'spy/websocket_server.h',
144       ],
145     },
146     {
147       # GN version: //mojo/shell:lib
148       'target_name': 'mojo_shell_lib',
149       'type': 'static_library',
150       'dependencies': [
151         '../base/base.gyp:base',
152         '../base/base.gyp:base_static',
153         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
154         'edk/mojo_edk.gyp:mojo_system_impl',
155         'mojo_application_manager',
156         'mojo_base.gyp:mojo_application_chromium',
157         'mojo_base.gyp:mojo_common_lib',
158         'mojo_external_service_bindings',
159         'mojo_gles2_impl',
160         'services/public/mojo_services_public.gyp:mojo_network_bindings',
161         'mojo_spy',
162         'public/mojo_public.gyp:mojo_application_bindings',
163       ],
164       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
165       'sources': [
166         'shell/app_child_process.cc',
167         'shell/app_child_process.h',
168         'shell/app_child_process.mojom',
169         'shell/app_child_process_host.cc',
170         'shell/app_child_process_host.h',
171         'shell/child_process.cc',
172         'shell/child_process.h',
173         'shell/child_process_host.cc',
174         'shell/child_process_host.h',
175         'shell/context.cc',
176         'shell/context.h',
177         'shell/dynamic_application_loader.cc',
178         'shell/dynamic_application_loader.h',
179         'shell/dynamic_service_runner.h',
180         'shell/external_application_listener_posix.cc',
181         'shell/external_application_listener_win.cc',
182         'shell/external_application_listener.h',
183         'shell/external_application_registrar.mojom',
184         'shell/incoming_connection_listener_posix.cc',
185         'shell/incoming_connection_listener_posix.h',
186         'shell/init.cc',
187         'shell/init.h',
188         'shell/in_process_dynamic_service_runner.cc',
189         'shell/in_process_dynamic_service_runner.h',
190         'shell/mojo_url_resolver.cc',
191         'shell/mojo_url_resolver.h',
192         'shell/out_of_process_dynamic_service_runner.cc',
193         'shell/out_of_process_dynamic_service_runner.h',
194         'shell/switches.cc',
195         'shell/switches.h',
196         'shell/task_runners.cc',
197         'shell/task_runners.h',
198         'shell/test_child_process.cc',
199         'shell/test_child_process.h',
200         'shell/ui_application_loader_android.cc',
201         'shell/ui_application_loader_android.h',
202       ],
203       'conditions': [
204         ['component=="shared_library"', {
205           'dependencies': [
206             '../ui/gl/gl.gyp:gl',
207           ],
208         }],
209         ['OS=="linux"', {
210           'sources': [
211             'shell/external_application_registrar_connection.cc',
212             'shell/external_application_registrar_connection.h',
213           ],
214         }],
215         ['OS=="android"', {
216           'dependencies': [
217             'mojo_network_service_lib',
218             'mojo_native_viewport_service_lib',
219           ],
220           'sources': [
221             'shell/network_application_loader.cc',
222             'shell/network_application_loader.h',
223           ],
224         }],
225       ],
226     },
227     {
228       # GN version: //mojo/shell:test_support
229       'target_name': 'mojo_shell_test_support',
230       'type': 'static_library',
231       'dependencies': [
232         'edk/mojo_edk.gyp:mojo_system_impl',
233         'mojo_shell_lib',
234       ],
235       'sources': [
236         'shell/shell_test_helper.cc',
237         'shell/shell_test_helper.h',
238       ],
239     },
240     {
241       # GN version: //mojo/shell
242       'target_name': 'mojo_shell',
243       'type': 'executable',
244       'dependencies': [
245         '../base/base.gyp:base',
246         'mojo_base.gyp:mojo_common_lib',
247         'mojo_base.gyp:mojo_environment_chromium',
248         'mojo_shell_lib',
249       ],
250       'sources': [
251         'shell/desktop/mojo_main.cc',
252       ],
253       'conditions': [
254         ['component=="shared_library"', {
255           'dependencies': [
256             '../ui/gfx/gfx.gyp:gfx',
257           ],
258         }],
259       ],
260     },
261     {
262       # GN version: //mojo/shell:mojo_shell_tests
263       'target_name': 'mojo_shell_tests',
264       'type': '<(gtest_target_type)',
265       'dependencies': [
266         '../base/base.gyp:base',
267         '../base/base.gyp:base_i18n',
268         '../base/base.gyp:test_support_base',
269         '../testing/gtest.gyp:gtest',
270         '../net/net.gyp:net_test_support',
271         '../url/url.gyp:url_lib',
272         'edk/mojo_edk.gyp:mojo_system_impl',
273         'mojo_application_manager',
274         'mojo_base.gyp:mojo_common_lib',
275         'mojo_base.gyp:mojo_environment_chromium',
276         'mojo_shell_lib',
277         'mojo_test_app',
278         'mojo_test_request_tracker_app',
279         'mojo_test_service_bindings',
280       ],
281       'sources': [
282         'shell/child_process_host_unittest.cc',
283         'shell/dynamic_application_loader_unittest.cc',
284         'shell/in_process_dynamic_service_runner_unittest.cc',
285         'shell/shell_test_base.cc',
286         'shell/shell_test_base.h',
287         'shell/shell_test_base_unittest.cc',
288         'shell/shell_test_main.cc',
289       ],
290       'conditions': [
291         ['OS == "android"', {
292           'dependencies': [
293             '../testing/android/native_test.gyp:native_test_native_code',
294           ],
295         }],
296       ],
297     },
298     {
299       # GN version: //mojo/application_manager
300       'target_name': 'mojo_application_manager',
301       'type': '<(component)',
302       'defines': [
303         'MOJO_APPLICATION_MANAGER_IMPLEMENTATION',
304       ],
305       'dependencies': [
306         '../base/base.gyp:base',
307         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
308         '../url/url.gyp:url_lib',
309         'services/public/mojo_services_public.gyp:mojo_content_handler_bindings',
310         'services/public/mojo_services_public.gyp:mojo_network_bindings',
311         'mojo_base.gyp:mojo_common_lib',
312         'mojo_base.gyp:mojo_environment_chromium',
313         'public/mojo_public.gyp:mojo_application_bindings',
314         '<(mojo_system_for_component)',
315       ],
316       'sources': [
317         'application_manager/application_loader.cc',
318         'application_manager/application_loader.h',
319         'application_manager/application_manager.cc',
320         'application_manager/application_manager.h',
321         'application_manager/application_manager_export.h',
322         'application_manager/background_shell_application_loader.cc',
323         'application_manager/background_shell_application_loader.h',
324       ],
325       'export_dependent_settings': [
326         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
327         'public/mojo_public.gyp:mojo_application_bindings',
328         'services/public/mojo_services_public.gyp:mojo_network_bindings',
329       ],
330     },
331     {
332       # GN version: //mojo/application_manager:mojo_application_manager_unittests
333       'target_name': 'mojo_application_manager_unittests',
334       'type': 'executable',
335       'dependencies': [
336         '../base/base.gyp:base',
337         '../testing/gtest.gyp:gtest',
338         '../url/url.gyp:url_lib',
339         'edk/mojo_edk.gyp:mojo_run_all_unittests',
340         'mojo_application_manager',
341         'mojo_base.gyp:mojo_application_chromium',
342         'mojo_base.gyp:mojo_common_lib',
343         'mojo_base.gyp:mojo_environment_chromium',
344         'public/mojo_public.gyp:mojo_cpp_bindings',
345       ],
346       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
347       'sources': [
348         'application_manager/application_manager_unittest.cc',
349         'application_manager/background_shell_application_loader_unittest.cc',
350         'application_manager/test.mojom',
351       ],
352     },
353     {
354       # GN version: //mojo/cc
355       'target_name': 'mojo_cc_support',
356       'type': 'static_library',
357       'dependencies': [
358         '../base/base.gyp:base',
359         '../cc/cc.gyp:cc',
360         '../cc/cc.gyp:cc_surfaces',
361         '../skia/skia.gyp:skia',
362         '../gpu/gpu.gyp:gles2_implementation',
363         'mojo_geometry_lib',
364         'mojo_surfaces_lib',
365         'services/public/mojo_services_public.gyp:mojo_surfaces_bindings',
366       ],
367       'includes': [
368         'mojo_public_gles2_for_loadable_module.gypi',
369       ],
370       'export_dependent_settings': [
371         'services/public/mojo_services_public.gyp:mojo_surfaces_bindings',
372       ],
373       'sources': [
374         'cc/context_provider_mojo.cc',
375         'cc/context_provider_mojo.h',
376         'cc/output_surface_mojo.cc',
377         'cc/output_surface_mojo.h',
378       ],
379     },
380     {
381       # GN version: //mojo/gles2
382       'target_name': 'mojo_gles2_impl',
383       'type': '<(component)',
384       'dependencies': [
385         '../base/base.gyp:base',
386         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
387         '../gpu/gpu.gyp:command_buffer_client',
388         '../gpu/gpu.gyp:command_buffer_common',
389         '../gpu/gpu.gyp:gles2_cmd_helper',
390         '../gpu/gpu.gyp:gles2_implementation',
391         'mojo_base.gyp:mojo_environment_chromium',
392         'mojo_gles2_lib',
393         'services/public/mojo_services_public.gyp:mojo_gpu_bindings',
394         '<(mojo_system_for_component)',
395       ],
396       'defines': [
397         'GLES2_USE_MOJO',
398         'GL_GLEXT_PROTOTYPES',
399         'MOJO_GLES2_IMPLEMENTATION',
400         'MOJO_GLES2_IMPL_IMPLEMENTATION',
401         'MOJO_USE_GLES2_IMPL'
402       ],
403       'direct_dependent_settings': {
404         'defines': [
405           'GLES2_USE_MOJO',
406         ],
407       },
408       'export_dependent_settings': [
409         'services/public/mojo_services_public.gyp:mojo_gpu_bindings',
410       ],
411       'sources': [
412         'gles2/command_buffer_client_impl.cc',
413         'gles2/command_buffer_client_impl.h',
414         'gles2/gles2_impl_export.h',
415         'gles2/gles2_impl.cc',
416         'gles2/gles2_context.cc',
417         'gles2/gles2_context.h',
418       ],
419       'all_dependent_settings': {
420         # Ensures that dependent projects import the core functions on Windows.
421         'defines': ['MOJO_USE_GLES2_IMPL'],
422       }
423     },
424     {
425       # GN version: //mojo/bindings/js/tests:mojo_js_unittests
426       'target_name': 'mojo_js_unittests',
427       'type': 'executable',
428       'dependencies': [
429         '../gin/gin.gyp:gin_test',
430         'edk/mojo_edk.gyp:mojo_common_test_support',
431         'edk/mojo_edk.gyp:mojo_run_all_unittests',
432         'mojo_base.gyp:mojo_js_bindings_lib',
433         'public/mojo_public.gyp:mojo_environment_standalone',
434         'public/mojo_public.gyp:mojo_public_test_interfaces',
435         'public/mojo_public.gyp:mojo_utility',
436       ],
437       'sources': [
438         'bindings/js/tests/run_js_tests.cc',
439       ],
440     },
441   ],
442   'conditions': [
443     ['OS=="android"', {
444       'targets': [
445         {
446           'target_name': 'mojo_native_viewport_java',
447           'type': 'none',
448           'dependencies': [
449             '../base/base.gyp:base_java',
450           ],
451           'variables': {
452             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
453           },
454           'includes': [ '../build/java.gypi' ],
455         },
456         {
457           'target_name': 'libmojo_shell',
458           'type': 'shared_library',
459           'dependencies': [
460             '../base/base.gyp:base',
461             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
462             '../ui/gfx/gfx.gyp:gfx',
463             '../ui/gfx/gfx.gyp:gfx_geometry',
464             '../ui/gl/gl.gyp:gl',
465             'mojo_base.gyp:mojo_common_lib',
466             'mojo_base.gyp:mojo_environment_chromium',
467             'mojo_base.gyp:mojo_jni_headers',
468             'mojo_shell_lib',
469             'public/mojo_public.gyp:mojo_application_bindings',
470           ],
471           'sources': [
472             'shell/android/library_loader.cc',
473             'shell/android/mojo_main.cc',
474             'shell/android/mojo_main.h',
475           ],
476         },
477         {
478           'target_name': 'mojo_shell_apk',
479           'type': 'none',
480           'dependencies': [
481             '../base/base.gyp:base_java',
482             '../net/net.gyp:net_java',
483             'mojo_native_viewport_java',
484             'libmojo_shell',
485           ],
486           'variables': {
487             'apk_name': 'MojoShell',
488             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
489             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
490             'native_lib_target': 'libmojo_shell',
491           },
492           'includes': [ '../build/java_apk.gypi' ],
493         }
494       ],
495     }],
496     ['OS=="linux"', {
497       'targets': [
498         {
499           # GN version: //mojo/shell:mojo_external_application_tests
500           'target_name': 'mojo_external_application_tests',
501           'type': '<(gtest_target_type)',
502           'dependencies': [
503             '../base/base.gyp:base',
504             '../base/base.gyp:test_support_base',
505             '../testing/gtest.gyp:gtest',
506             '../net/net.gyp:net_test_support',
507             '../url/url.gyp:url_lib',
508             'edk/mojo_edk.gyp:mojo_system_impl',
509             'mojo_application_manager',
510             'mojo_base.gyp:mojo_common_lib',
511             'mojo_base.gyp:mojo_environment_chromium',
512             'mojo_shell_lib',
513           ],
514           'sources': [
515             'shell/incoming_connection_listener_unittest.cc',
516             'shell/external_application_listener_unittest.cc',
517             'shell/external_application_test_main.cc',
518           ],
519         },
520       ],
521     }],
522     ['use_aura==1', {
523       'targets': [
524         {
525           # GN version: //mojo/aura
526           'target_name': 'mojo_aura_support',
527           'type': 'static_library',
528           'dependencies': [
529             '../cc/cc.gyp:cc',
530             '../ui/aura/aura.gyp:aura',
531             '../ui/compositor/compositor.gyp:compositor',
532             '../ui/events/events.gyp:events',
533             '../ui/events/events.gyp:events_base',
534             'mojo_cc_support',
535             'mojo_geometry_lib',
536             'mojo_surfaces_lib',
537             'mojo_view_manager_lib',
538             'public/mojo_public.gyp:mojo_application_base',
539             'public/mojo_public.gyp:mojo_application_bindings',
540             'services/public/mojo_services_public.gyp:mojo_native_viewport_bindings',
541           ],
542           'includes': [
543             'mojo_public_gles2_for_loadable_module.gypi',
544           ],
545           'sources': [
546             'aura/aura_init.cc',
547             'aura/aura_init.h',
548             'aura/screen_mojo.cc',
549             'aura/screen_mojo.h',
550             'aura/surface_binding.cc',
551             'aura/surface_binding.h',
552             'aura/surface_context_factory.cc',
553             'aura/surface_context_factory.h',
554             'aura/window_tree_host_mojo.cc',
555             'aura/window_tree_host_mojo.h',
556           ],
557         },
558         {
559           # GN version: //mojo/views
560           'target_name': 'mojo_views_support',
561           'type': 'static_library',
562           'dependencies': [
563             '../base/base.gyp:base',
564             '../base/base.gyp:base_i18n',
565             '../skia/skia.gyp:skia',
566             '../third_party/icu/icu.gyp:icui18n',
567             '../third_party/icu/icu.gyp:icuuc',
568             '../ui/aura/aura.gyp:aura',
569             '../ui/base/ui_base.gyp:ui_base',
570             '../ui/views/views.gyp:views',
571             '../ui/wm/wm.gyp:wm',
572             'mojo_aura_support',
573             'mojo_views_support_internal',
574             'mojo_view_manager_lib',
575             'services/public/mojo_services_public.gyp:mojo_view_manager_bindings',
576           ],
577           'sources': [
578             'views/input_method_mojo_linux.cc',
579             'views/input_method_mojo_linux.h',
580             'views/native_widget_view_manager.cc',
581             'views/native_widget_view_manager.h',
582             'views/views_init.cc',
583             'views/views_init.h',
584           ],
585         },
586         {
587           # GN version: //mojo/views:views_internal
588           'target_name': 'mojo_views_support_internal',
589           'type': '<(component)',
590           'dependencies': [
591             '../base/base.gyp:base',
592             '../base/base.gyp:base_i18n',
593             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
594             '../skia/skia.gyp:skia',
595             '../third_party/icu/icu.gyp:icui18n',
596             '../third_party/icu/icu.gyp:icuuc',
597             '../ui/base/ui_base.gyp:ui_base',
598             '../ui/gfx/gfx.gyp:gfx',
599           ],
600           'sources': [
601             'views/mojo_views_export.h',
602             'views/views_init_internal.cc',
603             'views/views_init_internal.h',
604           ],
605           'defines': [
606             'MOJO_VIEWS_IMPLEMENTATION',
607           ],
608         },
609         {
610           # GN version: //mojo/services/public/cpp/view_manager/lib:run_unittests
611           'target_name': 'mojo_view_manager_run_unittests',
612           'type': 'static_library',
613           'dependencies': [
614             '../base/base.gyp:base',
615             '../base/base.gyp:test_support_base',
616           ],
617           'sources': [
618             'services/public/cpp/view_manager/lib/view_manager_test_suite.cc',
619             'services/public/cpp/view_manager/lib/view_manager_test_suite.h',
620             'services/public/cpp/view_manager/lib/view_manager_unittests.cc',
621           ],
622           'conditions': [
623             ['use_x11==1', {
624               'dependencies': [
625                 '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
626               ],
627             }],
628           ],
629         },
630       ],
631     }],
632     ['component!="shared_library" and OS=="linux"', {
633       'targets': [
634         {
635           # GN version: //mojo/public/python:system
636           'target_name': 'mojo_python_system',
637           'variables': {
638             'python_base_module': 'mojo',
639             'python_cython_module': 'system',
640           },
641           'sources': [
642             'public/python/mojo/c_core.pxd',
643             'public/python/mojo/c_environment.pxd',
644             'public/python/mojo/system.pyx',
645             'public/python/src/python_system_helper.cc',
646             'public/python/src/python_system_helper.h',
647           ],
648           'dependencies': [
649             'public/mojo_public.gyp:mojo_environment_standalone',
650             'public/mojo_public.gyp:mojo_system',
651             'public/mojo_public.gyp:mojo_utility',
652           ],
653           'includes': [ '../third_party/cython/cython_compiler.gypi' ],
654         },
655         {
656           # GN version: //mojo/python:embedder
657           'target_name': 'mojo_python_embedder',
658           'type': 'loadable_module',
659           'variables': {
660             'python_base_module': 'mojo',
661             'python_cython_module': 'embedder',
662           },
663           'sources': [
664             'python/system/mojo/embedder.pyx',
665           ],
666           'dependencies': [
667             'edk/mojo_edk.gyp:mojo_system_impl',
668           ],
669           'includes': [ '../third_party/cython/cython_compiler.gypi' ],
670         },
671         {
672           # GN version: //mojo/public/python:bindings
673           'target_name': 'mojo_python_bindings',
674           'type': 'none',
675           'variables': {
676             'python_base_module': 'mojo/bindings',
677           },
678           'sources': [
679             'public/python/mojo/bindings/__init__.py',
680             'public/python/mojo/bindings/descriptor.py',
681             'public/python/mojo/bindings/messaging.py',
682             'public/python/mojo/bindings/promise.py',
683             'public/python/mojo/bindings/reflection.py',
684             'public/python/mojo/bindings/serialization.py',
685           ],
686           'dependencies': [
687             'mojo_python_system',
688           ],
689           'includes': [ '../third_party/cython/python_module.gypi' ],
690         },
691         {
692           # GN version: //mojo/python
693           'target_name': 'mojo_python',
694           'type': 'none',
695           'variables': {
696             'python_base_module': 'mojo',
697           },
698           'sources': [
699             'public/python/mojo/__init__.py',
700           ],
701           'dependencies': [
702             'mojo_python_bindings',
703             'mojo_python_embedder',
704             'mojo_python_system',
705           ],
706           # The python module need to be copied to their destinations
707           'actions': [
708             {
709               'action_name': 'Copy system module.',
710               'inputs': [
711                 '<(DEPTH)/build/cp.py',
712                 '<(PRODUCT_DIR)/libmojo_python_system.so',
713               ],
714               'outputs': [
715                 '<(PRODUCT_DIR)/python/mojo/system.so',
716               ],
717               'action': [
718                 'python',
719                 '<@(_inputs)',
720                 '<@(_outputs)',
721               ]
722             },
723             {
724               'action_name': 'Copy embedder module.',
725               'inputs': [
726                 '<(DEPTH)/build/cp.py',
727                 '<(PRODUCT_DIR)/libmojo_python_embedder.so',
728               ],
729               'outputs': [
730                 '<(PRODUCT_DIR)/python/mojo/embedder.so',
731               ],
732               'action': [
733                 'python',
734                 '<@(_inputs)',
735                 '<@(_outputs)',
736               ]
737             },
738           ],
739           'includes': [ '../third_party/cython/python_module.gypi' ],
740         },
741       ],
742     }],
743     ['component!="shared_library" and OS=="linux" and test_isolation_mode!="noop"', {
744       'targets': [
745         {
746           'target_name': 'mojo_python_unittests_run',
747           'type': 'none',
748           'dependencies': [
749             'mojo_python',
750             'public/mojo_public.gyp:mojo_public_test_interfaces',
751           ],
752           'includes': [
753             '../build/isolate.gypi',
754           ],
755           'sources': [
756             'mojo_python_unittests.isolate',
757           ],
758         },
759       ],
760     }],
761     ['test_isolation_mode != "noop"', {
762       'targets': [
763         {
764           'target_name': 'mojo_js_unittests_run',
765           'type': 'none',
766           'dependencies': [
767             'mojo_js_unittests',
768           ],
769           'includes': [
770             '../build/isolate.gypi',
771           ],
772           'sources': [
773             'mojo_js_unittests.isolate',
774           ],
775         },
776       ],
777     }],
778   ],