[Extensions] Make extension message bubble factory platform-abstract
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / chromevox / chromevox.gyp
blob226c35c229e49411add40116d05d87cb2b9b7a1c
1 # Copyright 2014 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   'conditions': [
7     ['chromeos==1', {
8       'variables': {
9         # Whether to compress the 4 main ChromeVox scripts.
10         'chromevox_compress_js%': '1',
11         'chromevox1_background_script_loader_file': 'chromevox/background/loader.js',
12         'chromevox1_content_script_loader_file': 'chromevox/injected/loader.js',
13         'chromevox1_kbexplorer_loader_file': 'chromevox/background/kbexplorer_loader.js',
14         'chromevox1_options_script_loader_file': 'chromevox/background/options_loader.js',
15         'chromevox2_background_script_loader_file': 'cvox2/background/loader.js',
16       },
17       'includes': [
18         'chromevox_tests.gypi',
19         'common.gypi',
20       ],
21       'targets': [
22         {
23           'target_name': 'chromevox',
24           'type': 'none',
25           'dependencies': [
26             'chromevox_resources',
27             'chromevox_manifest',
28             'chromevox_guest_manifest',
29           ],
30         },
31         {
32           'target_name': 'chromevox_resources',
33           'type': 'none',
34           'dependencies': [
35             'chromevox_assets',
36             'chromevox_static_files',
37             'chromevox_strings',
38             'chromevox_uncompiled_js_files',
39             '<(chromevox_third_party_dir)/chromevox.gyp:chromevox_third_party_resources',
40             '../braille_ime/braille_ime.gyp:braille_ime_manifest',
41           ],
42           'conditions': [
43             ['disable_nacl==0 and disable_nacl_untrusted==0', {
44               'dependencies': [
45                 '<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_wrapper_nacl',
46               ],
47             }],
48             ['chromevox_compress_js==1', {
49               'dependencies': [
50                 'chromevox1_background_script',
51                 'chromevox1_content_script',
52                 'chromevox1_kbexplorer_script',
53                 'chromevox1_options_script',
54                 'chromevox2_background_script',
55               ],
56             }, {  # chromevox_compress_js==0
57               'dependencies': [
58                 'chromevox_copied_scripts',
59                 'chromevox_deps',
60               ],
61             }],
62           ],
63         },
64         {
65           'target_name': 'chromevox_assets',
66           'type': 'none',
67           'includes': [
68             'chromevox_assets.gypi',
69           ],
70         },
71         {
72           'target_name': 'chromevox_static_files',
73           'type': 'none',
74           'copies': [
75             {
76               'destination': '<(chromevox_dest_dir)/chromevox/background',
77               'files': [
78                 'chromevox/background/background.html',
79                 'chromevox/background/kbexplorer.html',
80                 'chromevox/background/options.html',
81               ],
82             },
83             {
84               'destination': '<(PRODUCT_DIR)/resources/chromeos/chromevox/cvox2/background',
85               'files': [
86                 'cvox2/background/background.html',
87               ],
88             },
89           ],
90         },
91         {
92           # JavaScript files that are always directly included into the
93           # destination directory.
94           'target_name': 'chromevox_uncompiled_js_files',
95           'type': 'none',
96           'copies': [
97             {
98               'destination': '<(chromevox_dest_dir)/chromevox/injected',
99               'files': [
100                 'chromevox/injected/api.js',
101               ],
102               'conditions': [
103                 [ 'chromevox_compress_js==1', {
104                   'files': [
105                     # api_util.js is copied by the chromevox_copied_scripts
106                     # target in the non-compressed case.
107                     'chromevox/injected/api_util.js',
108                   ],
109                 }],
110               ],
111             },
112           ],
113           'conditions': [
114             [ 'chromevox_compress_js==0', {
115               'copies': [
116                 {
117                   'destination': '<(chromevox_dest_dir)/closure',
118                   'files': [
119                     'closure/closure_preinit.js',
120                   ],
121                 },
122               ],
123             }],
124           ],
125         },
126         {
127           'target_name': 'chromevox_strings',
128           'type': 'none',
129           'actions': [
130             {
131               'action_name': 'chromevox_strings',
132               'variables': {
133                 'grit_grd_file': 'strings/chromevox_strings.grd',
134                 'grit_out_dir': '<(chromevox_dest_dir)',
135                 # We don't generate any RC files, so no resource_ds file is needed.
136                 'grit_resource_ids': '',
137               },
138               'includes': [ '../../../../../build/grit_action.gypi' ],
139             },
140           ],
141         },
142         {
143           'target_name': 'chromevox_deps',
144           'type': 'none',
145           'variables': {
146             'deps_js_output_file': '<(chromevox_dest_dir)/deps.js',
147           },
148           'sources': [
149             '<(chromevox1_background_script_loader_file)',
150             '<(chromevox1_content_script_loader_file)',
151             '<(chromevox1_kbexplorer_loader_file)',
152             '<(chromevox1_options_script_loader_file)',
153             '<(chromevox2_background_script_loader_file)',
154           ],
155           'includes': ['generate_deps.gypi'],
156         },
157         {
158           'target_name': 'chromevox_manifest',
159           'type': 'none',
160           'variables': {
161             'output_manifest_path': '<(chromevox_dest_dir)/manifest.json',
162           },
163           'includes': [ 'generate_manifest.gypi', ],
164         },
165         {
166           'target_name': 'chromevox_guest_manifest',
167           'type': 'none',
168           'variables': {
169             'output_manifest_path': '<(chromevox_dest_dir)/manifest_guest.json',
170             'is_guest_manifest': 1,
171           },
172           'includes': [ 'generate_manifest.gypi', ],
173         },
174       ],
175       'conditions': [
176         ['chromevox_compress_js==1', {
177           'targets': [
178             {
179               'target_name': 'chromevox1_content_script',
180               'type': 'none',
181               'variables': {
182                 'output_file': '<(chromevox_dest_dir)/chromeVoxChromePageScript.js',
183               },
184               'sources': [ '<(chromevox1_content_script_loader_file)' ],
185               'includes': [ 'compress_js.gypi', ],
186             },
187             {
188               'target_name': 'chromevox1_background_script',
189               'type': 'none',
190               'variables': {
191                 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeBackgroundScript.js',
192               },
193               'sources': [ '<(chromevox1_background_script_loader_file)' ],
194               'includes': [ 'compress_js.gypi', ],
195             },
196             {
197               'target_name': 'chromevox1_options_script',
198               'type': 'none',
199               'variables': {
200                 'output_file': '<(chromevox_dest_dir)/chromeVoxChromeOptionsScript.js',
201               },
202               'sources': [ '<(chromevox1_options_script_loader_file)' ],
203               'includes': [ 'compress_js.gypi', ],
204             },
205             {
206               'target_name': 'chromevox1_kbexplorer_script',
207               'type': 'none',
208               'variables': {
209                 'output_file': '<(chromevox_dest_dir)/chromeVoxKbExplorerScript.js',
210               },
211               'sources': [ '<(chromevox1_kbexplorer_loader_file)' ],
212               'includes': [ 'compress_js.gypi', ],
213             },
214             {
215               'target_name': 'chromevox2_background_script',
216               'type': 'none',
217               'variables': {
218                 'output_file': '<(chromevox_dest_dir)/chromeVox2ChromeBackgroundScript.js',
219               },
220               'sources': [
221                 '<(chromevox1_background_script_loader_file)',
222                 '<(chromevox2_background_script_loader_file)',
223               ],
224               'includes': [ 'compress_js.gypi', ],
225             },
226           ],
227         }, {  # chromevox_compress_js==0
228           'targets': [
229             {
230               'target_name': 'chromevox_copied_scripts',
231               'type': 'none',
232               'variables': {
233                 'dest_dir': '<(chromevox_dest_dir)',
234               },
235               'sources': [
236                 '<(chromevox1_background_script_loader_file)',
237                 '<(chromevox1_content_script_loader_file)',
238                 '<(chromevox1_kbexplorer_loader_file)',
239                 '<(chromevox1_options_script_loader_file)',
240                 '<(chromevox2_background_script_loader_file)',
241               ],
242               'includes': [ 'copy_js.gypi', ],
243             },
244           ],
245         }],
246       ],
247     }],
248   ],