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