Home | History | Annotate | Download | only in keyboard
      1 # Copyright (c) 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   'variables': {
      7     'chromium_code': 1,
      8     'keyboard_mojom_gen_js': '<(SHARED_INTERMEDIATE_DIR)/ui/keyboard/webui/keyboard.mojom.js',
      9   },
     10   'targets': [
     11     {
     12       'target_name': 'keyboard_mojom_bindings',
     13       'type': 'none',
     14       'sources': [
     15         'webui/keyboard.mojom',
     16       ],
     17       'includes': [ '../../mojo/public/tools/bindings/mojom_bindings_generator.gypi' ],
     18     },
     19     {
     20       # GN version: //ui/keyboard:resources
     21       'target_name': 'keyboard_resources',
     22       'dependencies': [ 'keyboard_mojom_bindings', ],
     23       'type': 'none',
     24       'variables': {
     25         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/keyboard',
     26       },
     27       'actions': [
     28         {
     29           'action_name': 'keyboard_resources',
     30           'variables': {
     31             'grit_grd_file': 'keyboard_resources.grd',
     32             'grit_additional_defines': [
     33               '-E', 'keyboard_mojom_gen_js=<(keyboard_mojom_gen_js)',
     34             ],
     35           },
     36           'includes': [ '../../build/grit_action.gypi' ],
     37         },
     38       ],
     39       'includes': [ '../../build/grit_target.gypi' ],
     40       'copies': [
     41         {
     42           'destination': '<(PRODUCT_DIR)',
     43           'files': [
     44             '<(SHARED_INTERMEDIATE_DIR)/ui/keyboard/keyboard_resources.pak',
     45           ],
     46         },
     47       ],
     48     },
     49     {
     50       # GN version: //ui/keyboard
     51       'target_name': 'keyboard',
     52       'type': '<(component)',
     53       'dependencies': [
     54         '../../base/base.gyp:base',
     55         '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
     56         '../../content/content.gyp:content_browser',
     57         '../../ipc/ipc.gyp:ipc',
     58         '../../mojo/mojo_base.gyp:mojo_cpp_bindings',
     59         '../../mojo/mojo_base.gyp:mojo_environment_chromium',
     60         '../../mojo/mojo_base.gyp:mojo_js_bindings',
     61         '../../mojo/mojo_base.gyp:mojo_system_impl',
     62         '../../skia/skia.gyp:skia',
     63         '../../url/url.gyp:url_lib',
     64         '../aura/aura.gyp:aura',
     65         '../base/ui_base.gyp:ui_base',
     66         '../compositor/compositor.gyp:compositor',
     67         '../events/events.gyp:events',
     68         '../gfx/gfx.gyp:gfx',
     69         '../gfx/gfx.gyp:gfx_geometry',
     70         '../wm/wm.gyp:wm',
     71         'keyboard_mojom_bindings',
     72         'keyboard_resources',
     73       ],
     74       'defines': [
     75         'KEYBOARD_IMPLEMENTATION',
     76       ],
     77       'sources': [
     78         'keyboard.cc',
     79         'keyboard.h',
     80         'keyboard_constants.cc',
     81         'keyboard_constants.h',
     82         'keyboard_controller.cc',
     83         'keyboard_controller.h',
     84         'keyboard_controller_observer.h',
     85         'keyboard_controller_proxy.cc',
     86         'keyboard_controller_proxy.h',
     87         'keyboard_layout_manager.h',
     88         'keyboard_layout_manager.cc',
     89         'keyboard_export.h',
     90         'keyboard_switches.cc',
     91         'keyboard_switches.h',
     92         'keyboard_util.cc',
     93         'keyboard_util.h',
     94         'webui/vk_mojo_handler.cc',
     95         'webui/vk_mojo_handler.h',
     96         'webui/vk_webui_controller.cc',
     97         'webui/vk_webui_controller.h',
     98         '<(SHARED_INTERMEDIATE_DIR)/ui/keyboard/webui/keyboard.mojom.cc',
     99       ]
    100     },
    101     {
    102       'target_name': 'keyboard_unittests',
    103       'type': '<(gtest_target_type)',
    104       'dependencies': [
    105         '../../base/base.gyp:base',
    106         '../../base/base.gyp:test_support_base',
    107         '../../content/content.gyp:content',
    108         '../../skia/skia.gyp:skia',
    109         '../../testing/gtest.gyp:gtest',
    110         '../../url/url.gyp:url_lib',
    111         '../aura/aura.gyp:aura',
    112         '../aura/aura.gyp:aura_test_support',
    113         '../base/ui_base.gyp:ui_base',
    114         '../compositor/compositor.gyp:compositor',
    115         '../compositor/compositor.gyp:compositor_test_support',
    116         '../gfx/gfx.gyp:gfx',
    117         '../gfx/gfx.gyp:gfx_geometry',
    118         '../resources/ui_resources.gyp:ui_test_pak',
    119         '../wm/wm.gyp:wm',
    120         'keyboard',
    121       ],
    122       'sources': [
    123         'test/run_all_unittests.cc',
    124         'keyboard_controller_unittest.cc',
    125       ],
    126       'conditions': [
    127         ['OS=="linux" and use_allocator!="none"', {
    128           'dependencies': [
    129             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
    130           ],
    131           'link_settings': {
    132             'ldflags': ['-rdynamic'],
    133           },
    134         }],
    135         ['OS=="win" and win_use_allocator_shim==1', {
    136           'dependencies': [
    137             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
    138           ],
    139         }],
    140       ],
    141     },
    142   ],
    143 }
    144