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