Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / chrome_resources.gyp
blobea06883d01fe3f325f3d2de20b1f24f7acf1bb52
1 # Copyright (c) 2012 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.
5   'variables': {
6     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
7     'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
8     'additional_modules_list_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/internal/additional_modules_list.txt',
9     'omnibox_mojom_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/ui/webui/omnibox/omnibox.mojom.js',
10   },
11   'targets': [
12     {
13       'target_name': 'chrome_extra_resources',
14       'type': 'none',
15       # These resources end up in resources.pak because they are resources
16       # used by internal pages.  Putting them in a separate pak file makes
17       # it easier for us to reference them internally.
18       'actions': [
19         {
20           'action_name': 'memory_internals_resources',
21           'variables': {
22             'grit_grd_file': 'browser/resources/memory_internals_resources.grd',
23           },
24           'includes': [ '../build/grit_action.gypi' ],
25         },
26         {
27           'action_name': 'net_internals_resources',
28           'variables': {
29             'grit_grd_file': 'browser/resources/net_internals_resources.grd',
30           },
31           'includes': [ '../build/grit_action.gypi' ],
32         },
33         {
34           'action_name': 'invalidations_resources',
35           'variables': {
36             'grit_grd_file': 'browser/resources/invalidations_resources.grd',
37             },
38           'includes': ['../build/grit_action.gypi' ],
39         },
40         {
41           'action_name': 'password_manager_internals_resources',
42           'variables': {
43             'grit_grd_file': 'browser/resources/password_manager_internals_resources.grd',
44           },
45           'includes': [ '../build/grit_action.gypi' ],
46         },
47         {
48           'action_name': 'signin_internals_resources',
49           'variables': {
50             'grit_grd_file': 'browser/resources/signin_internals_resources.grd',
51             },
52           'includes': ['../build/grit_action.gypi' ],
53         },
54         {
55           'action_name': 'sync_internals_resources',
56           'variables': {
57             'grit_grd_file': 'browser/resources/sync_internals_resources.grd',
58           },
59           'includes': [ '../build/grit_action.gypi' ],
60         },
61         {
62           'action_name': 'translate_internals_resources',
63           'variables': {
64             'grit_grd_file': 'browser/resources/translate_internals_resources.grd',
65           },
66           'includes': [ '../build/grit_action.gypi' ],
67         },
68       ],
69       'includes': [ '../build/grit_target.gypi' ],
70       'conditions': [
71         ['OS != "ios"', {
72           'dependencies': [
73             '../components/components_resources.gyp:components_resources',
74             '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
75             '../content/browser/tracing/tracing_resources.gyp:tracing_resources',
76           ],
77           'actions': [
78             {
79               'action_name': 'component_extension_resources',
80               'variables': {
81                 'grit_grd_file': 'browser/resources/component_extension_resources.grd',
82               },
83               'includes': [ '../build/grit_action.gypi' ],
84             },
85             {
86               'action_name': 'options_resources',
87               'variables': {
88                 'grit_grd_file': 'browser/resources/options_resources.grd',
89               },
90               'includes': [ '../build/grit_action.gypi' ],
91             },
92             {
93               'action_name': 'quota_internals_resources',
94               'variables': {
95                 'grit_grd_file': 'browser/resources/quota_internals_resources.grd',
96               },
97               'includes': [ '../build/grit_action.gypi' ],
98             },
99             {
100               'action_name': 'sync_file_system_internals_resources',
101               'variables': {
102                 'grit_grd_file': 'browser/resources/sync_file_system_internals_resources.grd',
103               },
104               'includes': [ '../build/grit_action.gypi' ],
105             },
106           ],
107           'copies': [
108             {
109               'destination': '<(PRODUCT_DIR)/resources/extension/demo',
110               'files': [
111                 'browser/resources/extension_resource/demo/library.js',
112               ],
113             },
114           ],
115         }],
116         ['chromeos==1 and disable_nacl==0 and disable_nacl_untrusted==0', {
117           'dependencies': [
118             '../chrome/third_party/chromevox/chromevox.gyp:chromevox_resources',
119             'chromevox_strings',
120           ],
121         }],
122       ],
123     },
124     {
125       'target_name': 'chrome_internal_resources_gen',
126       'type': 'none',
127       'conditions': [
128         ['branding=="Chrome"', {
129           'actions': [
130             {
131               'action_name': 'transform_additional_modules_list',
132               'variables': {
133                 'additional_modules_input_path':
134                   'browser/internal/resources/additional_modules_list.input',
135                 'additional_modules_py_path':
136                   'browser/internal/transform_additional_modules_list.py',
137               },
138               'inputs': [
139                 '<(additional_modules_input_path)',
140               ],
141               'outputs': [
142                 '<(additional_modules_list_file)',
143               ],
144               'action': [
145                 'python',
146                 '<(additional_modules_py_path)',
147                 '<(additional_modules_input_path)',
148                 '<@(_outputs)',
149               ],
150               'message': 'Transforming additional modules list',
151             }
152           ],
153         }],
154       ],
155     },
156     {
157       # TODO(mark): It would be better if each static library that needed
158       # to run grit would list its own .grd files, but unfortunately some
159       # of the static libraries currently have circular dependencies among
160       # generated headers.
161       'target_name': 'chrome_resources',
162       'type': 'none',
163       'dependencies': [
164         'about_credits',
165         'chrome_internal_resources_gen',
166         'chrome_web_ui_mojo_bindings.gyp:web_ui_mojo_bindings',
167       ],
168       'actions': [
169         # Data resources.
170         {
171           'action_name': 'browser_resources',
172           'variables': {
173             'grit_grd_file': 'browser/browser_resources.grd',
174             'grit_additional_defines': [
175               '-E', 'about_credits_file=<(about_credits_file)',
176               '-E', 'additional_modules_list_file=<(additional_modules_list_file)',
177               '-E', 'omnibox_mojom_file=<(omnibox_mojom_file)',
178             ],
179           },
180           'includes': [ '../build/grit_action.gypi' ],
181         },
182         {
183           'action_name': 'common_resources',
184           'variables': {
185             'grit_grd_file': 'common/common_resources.grd',
186           },
187           'includes': [ '../build/grit_action.gypi' ],
188         },
189         {
190           'action_name': 'renderer_resources',
191           'variables': {
192             'grit_grd_file': 'renderer/resources/renderer_resources.grd',
193           },
194           'includes': [ '../build/grit_action.gypi' ],
195         },
196       ],
197       'conditions': [
198         ['enable_extensions==1', {
199           'actions': [
200             {
201               'action_name': 'extensions_api_resources',
202               'variables': {
203                 'grit_grd_file': 'common/extensions_api_resources.grd',
204               },
205               'includes': [ '../build/grit_action.gypi' ],
206             }
207           ],
208         }],
209       ],
210       'includes': [ '../build/grit_target.gypi' ],
211     },
212     {
213       # TODO(mark): It would be better if each static library that needed
214       # to run grit would list its own .grd files, but unfortunately some
215       # of the static libraries currently have circular dependencies among
216       # generated headers.
217       'target_name': 'chrome_strings',
218       'type': 'none',
219       'actions': [
220         # Localizable resources.
221         {
222           'action_name': 'locale_settings',
223           'variables': {
224             'grit_grd_file': 'app/resources/locale_settings.grd',
225           },
226           'includes': [ '../build/grit_action.gypi' ],
227         },
228         {
229           'action_name': 'chromium_strings.grd',
230           'variables': {
231             'grit_grd_file': 'app/chromium_strings.grd',
232           },
233           'includes': [ '../build/grit_action.gypi' ],
234         },
235         {
236           'action_name': 'generated_resources',
237           'variables': {
238             'grit_grd_file': 'app/generated_resources.grd',
239           },
240           'includes': [ '../build/grit_action.gypi' ],
241         },
242         {
243           'action_name': 'google_chrome_strings',
244           'variables': {
245             'grit_grd_file': 'app/google_chrome_strings.grd',
246           },
247           'includes': [ '../build/grit_action.gypi' ],
248         },
249       ],
250       'includes': [ '../build/grit_target.gypi' ],
251     },
252     {
253       'target_name': 'platform_locale_settings',
254       'type': 'none',
255       'variables': {
256         'conditions': [
257           ['OS=="win"', {
258             'platform_locale_settings_grd':
259                 'app/resources/locale_settings_win.grd',
260           },],
261           ['OS=="linux"', {
262             'conditions': [
263               ['chromeos==1', {
264                 'conditions': [
265                   ['branding=="Chrome"', {
266                     'platform_locale_settings_grd':
267                         'app/resources/locale_settings_google_chromeos.grd',
268                   }, {  # branding!=Chrome
269                     'platform_locale_settings_grd':
270                         'app/resources/locale_settings_chromiumos.grd',
271                   }],
272                 ]
273               }, {  # chromeos==0
274                 'platform_locale_settings_grd':
275                     'app/resources/locale_settings_linux.grd',
276               }],
277             ],
278           },],
279           ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
280             'platform_locale_settings_grd':
281                 'app/resources/locale_settings_linux.grd',
282           },],
283           ['OS == "mac" or OS == "ios"', {
284             'platform_locale_settings_grd':
285                 'app/resources/locale_settings_mac.grd',
286           }],
287         ],  # conditions
288       },  # variables
289       'actions': [
290         {
291           'action_name': 'platform_locale_settings',
292           'variables': {
293             'grit_grd_file': '<(platform_locale_settings_grd)',
294           },
295           'includes': [ '../build/grit_action.gypi' ],
296         },
297       ],
298       'includes': [ '../build/grit_target.gypi' ],
299     },
300     {
301       'target_name': 'theme_resources_gen',
302       'type': 'none',
303       'actions': [
304         {
305           'action_name': 'theme_resources',
306           'variables': {
307             'grit_grd_file': 'app/theme/theme_resources.grd',
308           },
309           'includes': [ '../build/grit_action.gypi' ],
310         },
311       ],
312       'includes': [ '../build/grit_target.gypi' ],
313     },
314     {
315       'target_name': 'theme_resources',
316       'type': 'none',
317       'dependencies': [
318         'chrome_unscaled_resources',
319         'theme_resources_gen',
320         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
321       ],
322     },
323     {
324       'target_name': 'packed_extra_resources',
325       'type': 'none',
326       'dependencies': [
327         'chrome_extra_resources',
328         'packed_resources',
329       ],
330       'actions': [
331         {
332           'includes': ['chrome_repack_resources.gypi']
333         },
334       ],
335       'conditions': [
336         ['OS != "mac" and OS != "ios"', {
337           # We'll install the resource files to the product directory.  The Mac
338           # copies the results over as bundle resources in its own special way.
339           'copies': [
340             {
341               'destination': '<(PRODUCT_DIR)',
342               'files': [
343                 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
344               ],
345             },
346           ],
347         }],
348       ],
349     },
350     {
351       'target_name': 'packed_resources',
352       'type': 'none',
353       'dependencies': [
354         # MSVS needs the dependencies explictly named, Make is able to
355         # derive the dependencies from the output files.
356         'chrome_resources',
357         'chrome_strings',
358         'platform_locale_settings',
359         'theme_resources',
360         '<(DEPTH)/components/components_strings.gyp:components_strings',
361         '<(DEPTH)/net/net.gyp:net_resources',
362         '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
363         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
364       ],
365       'actions': [
366         {
367           'action_name': 'repack_locales_pack',
368           'variables': {
369             'pak_locales': '<(locales)',
370           },
371           'includes': ['chrome_repack_locales.gypi']
372         },
373         {
374           'action_name': 'repack_pseudo_locales_pack',
375           'variables': {
376             'pak_locales': '<(pseudo_locales)',
377           },
378           'includes': ['chrome_repack_locales.gypi']
379         },
380         {
381           'includes': ['chrome_repack_chrome_100_percent.gypi']
382         },
383         {
384           'includes': ['chrome_repack_chrome_200_percent.gypi']
385         },
386       ],
387       'conditions': [
388         ['OS != "ios"', {
389           'dependencies': [
390             '<(DEPTH)/content/content_resources.gyp:content_resources',
391             '<(DEPTH)/device/bluetooth/bluetooth_strings.gyp:device_bluetooth_strings',
392             '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
393             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
394             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
395           ],
396         }],
397         ['use_ash==1', {
398           'dependencies': [
399              '<(DEPTH)/ash/ash_strings.gyp:ash_strings',
400              '<(DEPTH)/ash/ash.gyp:ash_resources',
401           ],
402         }],
403         ['enable_autofill_dialog==1 and OS!="android"', {
404           'dependencies': [
405             '<(DEPTH)/third_party/libaddressinput/libaddressinput.gyp:libaddressinput_strings',
406           ],
407         }],
408         ['OS != "mac" and OS != "ios"', {
409           # Copy pak files to the product directory. These files will be picked
410           # up by the following installer scripts:
411           #   - Windows: chrome/installer/mini_installer/chrome.release
412           #   - Linux: chrome/installer/linux/internal/common/installer.include
413           # Ensure that the above scripts are updated when adding or removing
414           # pak files.
415           # Copying files to the product directory is not needed on the Mac
416           # since the framework build phase will copy them into the framework
417           # bundle directly.
418           'copies': [
419             {
420               'destination': '<(PRODUCT_DIR)',
421               'files': [
422                 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'
423               ],
424             },
425             {
426               'destination': '<(PRODUCT_DIR)/locales',
427               'files': [
428                 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))'
429               ],
430             },
431             {
432               'destination': '<(PRODUCT_DIR)/pseudo_locales',
433               'files': [
434                 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pseudo_locales))'
435               ],
436             },
437           ],
438           'conditions': [
439             ['branding=="Chrome"', {
440               'copies': [
441                 {
442                   # This location is for the Windows and Linux builds. For
443                   # Windows, the chrome.release file ensures that these files
444                   # are copied into the installer. Note that we have a separate
445                   # section in chrome_dll.gyp to copy these files for Mac, as it
446                   # needs to be dropped inside the framework.
447                   'destination': '<(PRODUCT_DIR)/default_apps',
448                   'files': ['<@(default_apps_list)']
449                 },
450               ],
451             }],
452             ['enable_hidpi == 1', {
453               'copies': [
454                 {
455                   'destination': '<(PRODUCT_DIR)',
456                   'files': [
457                     '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
458                   ],
459                 },
460               ],
461             }],
462           ], # conditions
463         }], # end OS != "mac" and OS != "ios"
464       ], # conditions
465     },
466     {
467       'target_name': 'chrome_unscaled_resources',
468       'type': 'none',
469       'variables': {
470         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
471       },
472       'actions': [
473         {
474           'action_name': 'chrome_unscaled_resources',
475           'variables': {
476             'grit_grd_file': 'app/theme/chrome_unscaled_resources.grd',
477           },
478           'includes': [ '../build/grit_action.gypi' ],
479         },
480       ],
481       'includes': [ '../build/grit_target.gypi' ],
482     },
483     {
484       'target_name': 'about_credits',
485       'type': 'none',
486       'actions': [
487         {
488           'variables': {
489             'generator_path': '../tools/licenses.py',
490           },
491           'action_name': 'generate_about_credits',
492           'inputs': [
493             # TODO(phajdan.jr): make licenses.py print inputs too.
494             '<(generator_path)',
495           ],
496           'outputs': [
497             '<(about_credits_file)',
498           ],
499           'hard_dependency': 1,
500           'action': ['python',
501                      '<(generator_path)',
502                      'credits',
503                      '<(about_credits_file)',
504           ],
505           'message': 'Generating about:credits',
506         },
507       ],
508     },
509     {
510       'target_name': 'chromevox_strings',
511       'type': 'none',
512       'actions': [
513         {
514           'action_name': 'chromevox_strings',
515           'variables': {
516             'grit_grd_file': 'browser/resources/chromeos/chromevox/strings/chromevox_strings.grd',
517             # TODO(plundblad): Change to use PRODUCT_DIR when we have
518             # translations.
519             'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/resources/chromeos/chromevox',
520             # We don't generate any RC files, so no resource_ds file is needed.
521             'grit_resource_ids': '',
522           },
523           'includes': [ '../build/grit_action.gypi' ],
524         },
525       ],
526     },
527   ], # targets