Adding functions to check status of camera permission.
[chromium-blink-merge.git] / remoting / remoting_host.gypi
blob08d6639fa680b40661cfb5405288991efcfe4236
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.
6   'includes': [
7     'remoting_host_linux.gypi',
8     'remoting_host_mac.gypi',
9     'remoting_host_win.gypi',
10   ],
12   'variables': {
13     'conditions': [
14       # Remoting host is supported only on Windows, OSX and Linux (with X11).
15       ['OS=="win" or OS=="mac" or (OS=="linux" and use_x11==1)', {
16         'enable_me2me_host': 1,
17         'enable_it2me_host': 1,
18         'enable_remoting_host': 1,
19       }, {
20         'enable_me2me_host': 0,
21         'enable_it2me_host': 0,
22         'enable_remoting_host': 0,
23       }],
24       ['chromeos==1 and use_x11==1', {
25         'enable_me2me_host': 0,
26         'enable_it2me_host': 1,
27       }],
28     ],
29   },
31   'conditions': [
32     ['enable_remoting_host==1', {
33       'targets': [
34         {
35           # GN version: //remoting/host
36           'target_name': 'remoting_host',
37           'type': 'static_library',
38           'variables': {
39             'enable_wexit_time_destructors': 1,
40             'host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
41             'prefpane_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
42           },
43           'dependencies': [
44             'remoting_base',
45             'remoting_protocol',
46             'remoting_resources',
47             '../base/base.gyp:base_i18n',
48             '../crypto/crypto.gyp:crypto',
49             '../google_apis/google_apis.gyp:google_apis',
50             '../ipc/ipc.gyp:ipc',
51             '../ui/events/events.gyp:dom4_keycode_converter',
52           ],
53           'defines': [
54             'HOST_BUNDLE_NAME="<(host_bundle_name)"',
55             'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
56             'VERSION=<(version_full)',
57           ],
58           'sources': [
59             '<@(remoting_host_sources)',
60           ],
61           'conditions': [
62             ['OS=="linux"', {
63               'dependencies': [
64                 '../build/linux/system.gyp:x11',
65                 '../build/linux/system.gyp:xext',
66                 '../build/linux/system.gyp:xfixes',
67                 '../build/linux/system.gyp:xi',
68                 '../build/linux/system.gyp:xrandr',
69                 '../build/linux/system.gyp:xtst',
70               ],
71               'link_settings': {
72                 'libraries': [
73                   '-lpam',
74                 ],
75               },
76             }],
77             ['OS=="linux" and chromeos==0 and use_ozone==0', {
78               'dependencies' : [
79                 # Always use GTK on Linux, even for Aura builds.
80                 '../build/linux/system.gyp:gtk',
81               ],
82             }],
83             ['chromeos==1', {
84               'dependencies' : [
85                 '../cc/cc.gyp:cc',
86                 '../components/components.gyp:policy_component_common',
87                 '../content/content.gyp:content',
88                 '../ppapi/ppapi_internal.gyp:ppapi_host',
89                 '../skia/skia.gyp:skia',
90                 '../ui/aura/aura.gyp:aura',
91                 '../ui/compositor/compositor.gyp:compositor',
92                 '../ui/events/events.gyp:events',
93                 '../ui/views/views.gyp:views',
94               ],
95               'include_dirs': [
96                 '../third_party/skia/include/utils',
97               ],
98               'sources!' : [
99                 'host/clipboard_x11.cc',
100                 'host/continue_window_linux.cc',
101                 'host/disconnect_window_linux.cc',
102                 'host/policy_hack/policy_watcher_linux.cc',
103                 'host/remoting_me2me_host.cc',
104               ]
105             }, {  # chromeos==0
106                'sources!' : [
107                  'host/chromeos/aura_desktop_capturer.cc',
108                  'host/chromeos/aura_desktop_capturer.h',
109                  'host/chromeos/message_box.cc',
110                  'host/chromeos/message_box.h',
111                  'host/clipboard_aura.cc',
112                  'host/clipboard_aura.h',
113                  'host/continue_window_chromeos.cc',
114                  'host/disconnect_window_chromeos.cc',
115                  'host/policy_hack/policy_watcher_chromeos.cc',
116                ],
117             }],
118             ['OS=="mac"', {
119               'dependencies': [
120                 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
121               ],
122               'link_settings': {
123                 'libraries': [
124                   '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
125                   'libpam.a',
126                ],
127               },
128             }],
129             ['OS=="win"', {
130               'defines': [
131                 '_ATL_NO_EXCEPTIONS',
132                 'ISOLATION_AWARE_ENABLED=1',
133               ],
134               'dependencies': [
135                 '../sandbox/sandbox.gyp:sandbox',
136                 'remoting_host_messages',
137                 'remoting_lib_idl',
138               ],
139               'msvs_settings': {
140                 'VCCLCompilerTool': {
141                   # /MP conflicts with #import directive so we limit the number
142                   # of processes to spawn to 1.
143                   'AdditionalOptions': ['/MP1'],
144                 },
145               },
146               'variables': {
147                 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
148               },
149               'sources': [
150                 '<(output_dir)/remoting_host_messages.mc',
151               ],
152               'include_dirs': [
153                 '<(output_dir)',
154               ],
155               'direct_dependent_settings': {
156                 'include_dirs': [
157                   '<(output_dir)',
158                 ],
159               },
160               'rules': [{
161                 # Rule to run the message compiler.
162                 'rule_name': 'message_compiler',
163                 'extension': 'mc',
164                 'outputs': [
165                   '<(output_dir)/<(RULE_INPUT_ROOT).h',
166                   '<(output_dir)/<(RULE_INPUT_ROOT).rc',
167                 ],
168                 'action': [
169                   'mc.exe',
170                   '-h', '<(output_dir)',
171                   '-r', '<(output_dir)/.',
172                   '-u',
173                   '<(RULE_INPUT_PATH)',
174                 ],
175                 'process_outputs_as_sources': 1,
176                 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
177               }],
178             }],
179             ['use_ash==1', {
180               'dependencies': [
181                  '../ash/ash.gyp:ash',
182               ],
183             }],
184             ['enable_webrtc==1', {
185               'dependencies': [
186                 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
187                 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
188               ],
189               'sources': [
190                 '<@(remoting_cast_sources)',
191               ],
192             }],
193           ],
194         },  # end of target 'remoting_host'
196         {
197           'target_name': 'remoting_native_messaging_base',
198           'type': 'static_library',
199           'variables': { 'enable_wexit_time_destructors': 1, },
200           'dependencies': [
201             '../base/base.gyp:base',
202           ],
203           'sources': [
204             'host/native_messaging/pipe_messaging_channel.cc',
205             'host/native_messaging/pipe_messaging_channel.h',
206             'host/native_messaging/native_messaging_pipe.cc',
207             'host/native_messaging/native_messaging_pipe.h',
208             'host/native_messaging/native_messaging_reader.cc',
209             'host/native_messaging/native_messaging_reader.h',
210             'host/native_messaging/native_messaging_writer.cc',
211             'host/native_messaging/native_messaging_writer.h',
212           ],
213         },  # end of target 'remoting_native_messaging_base'
215         {
216           'target_name': 'remoting_host_setup_base',
217           'type': 'static_library',
218           'variables': { 'enable_wexit_time_destructors': 1, },
219           'dependencies': [
220             '../base/base.gyp:base',
221             '../google_apis/google_apis.gyp:google_apis',
222             'remoting_host',
223           ],
224           'defines': [
225             'VERSION=<(version_full)',
226           ],
227           'sources': [
228             'host/setup/daemon_controller.cc',
229             'host/setup/daemon_controller.h',
230             'host/setup/daemon_controller_delegate_linux.cc',
231             'host/setup/daemon_controller_delegate_linux.h',
232             'host/setup/daemon_controller_delegate_mac.h',
233             'host/setup/daemon_controller_delegate_mac.mm',
234             'host/setup/daemon_controller_delegate_win.cc',
235             'host/setup/daemon_controller_delegate_win.h',
236             'host/setup/daemon_installer_win.cc',
237             'host/setup/daemon_installer_win.h',
238             'host/setup/me2me_native_messaging_host.cc',
239             'host/setup/me2me_native_messaging_host.h',
240             'host/setup/oauth_client.cc',
241             'host/setup/oauth_client.h',
242             'host/setup/oauth_helper.cc',
243             'host/setup/oauth_helper.h',
244             'host/setup/pin_validator.cc',
245             'host/setup/pin_validator.h',
246             'host/setup/service_client.cc',
247             'host/setup/service_client.h',
248             'host/setup/test_util.cc',
249             'host/setup/test_util.h',
250             'host/setup/win/auth_code_getter.cc',
251             'host/setup/win/auth_code_getter.h',
252           ],
253           'conditions': [
254             ['OS=="win"', {
255               'dependencies': [
256                 '../google_update/google_update.gyp:google_update',
257                 'remoting_lib_idl',
258               ],
259               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
260               'msvs_disabled_warnings': [4267, ],
261             }],
262           ],
263         },  # end of target 'remoting_host_setup_base'
265         # Generates native messaging manifest files.
266         {
267           'target_name': 'remoting_native_messaging_manifests',
268           'type': 'none',
269           'conditions': [
270             [ 'OS == "win"', {
271               'variables': {
272                 'me2me_host_path': 'remoting_native_messaging_host.exe',
273                 'it2me_host_path': 'remote_assistance_host.exe',
274               },
275             }],
276             [ 'OS == "mac"', {
277               'variables': {
278                 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
279                 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
280                 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
281                 'me2me_host_path':
282                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
283                 'it2me_host_path':
284                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
285               },
286             }],
287             [ 'OS != "mac" and OS != "win"', {
288               'variables': {
289                 'me2me_host_path':
290                     '/opt/google/chrome-remote-desktop/native-messaging-host',
291                 'it2me_host_path':
292                     '/opt/google/chrome-remote-desktop/remote-assistance-host',
293               },
294             }],
295           ],  # conditions
296           'sources': [
297             'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
298             'host/setup/com.google.chrome.remote_desktop.json.jinja2',
299           ],
300           'rules': [{
301             'rule_name': 'generate_manifest',
302             'extension': 'jinja2',
303             'inputs': [
304               '<(remoting_localize_path)',
305               '<(branding_path)',
306             ],
307             'outputs': [
308               '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
309             ],
310             'action': [
311               'python', '<(remoting_localize_path)',
312               '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
313               '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
314               '--variables', '<(branding_path)',
315               '--template', '<(RULE_INPUT_PATH)',
316               '--locale_output', '<@(_outputs)',
317               'en',
318             ],
319           }],
320         },  # end of target 'remoting_native_messaging_manifests'
321         {
322           'target_name': 'remoting_start_host',
323           'type': 'executable',
324           'dependencies': [
325             'remoting_host_setup_base',
326           ],
327           'sources': [
328             'host/setup/host_starter.cc',
329             'host/setup/host_starter.h',
330             'host/setup/start_host.cc',
331           ],
332           'conditions': [
333             ['OS=="linux" and use_allocator!="none"', {
334               'dependencies': [
335                 '../base/allocator/allocator.gyp:allocator',
336               ],
337             }],
338           ],
339         },  # end of target 'remoting_start_host'
340         {
341           'target_name': 'remoting_infoplist_strings',
342           'type': 'none',
343           'dependencies': [
344             'remoting_resources',
345           ],
346           'sources': [
347             'host/remoting_me2me_host-InfoPlist.strings.jinja2',
348             'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
349             'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
350             'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
351             'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
352           ],
353           'rules': [{
354             'rule_name': 'generate_strings',
355             'extension': 'jinja2',
356             'inputs': [
357               '<(remoting_localize_path)',
358             ],
359             'outputs': [
360               '<!@pymod_do_main(remoting_localize --locale_output '
361                   '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
362                   '--print_only <(remoting_locales))',
363             ],
364             'action': [
365               'python', '<(remoting_localize_path)',
366               '--locale_dir', '<(webapp_locale_dir)',
367               '--template', '<(RULE_INPUT_PATH)',
368               '--locale_output',
369               '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
370               '<@(remoting_locales)',
371             ]},
372           ],
373         },  # end of target 'remoting_infoplist_strings'
374       ],  # end of 'targets'
375     }],  # 'enable_remoting_host==1'
377     ['enable_me2me_host==1', {
378       'targets': [
379         {
380           'target_name': 'remoting_me2me_host_static',
381           'type': 'static_library',
382           'variables': { 'enable_wexit_time_destructors': 1, },
383           'dependencies': [
384             '../base/base.gyp:base',
385             '../base/base.gyp:base_i18n',
386             '../net/net.gyp:net',
387             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
388             'remoting_base',
389             'remoting_breakpad',
390             'remoting_host',
391             'remoting_protocol',
392           ],
393           'defines': [
394             'VERSION=<(version_full)',
395           ],
396           'sources': [
397             'host/curtain_mode.h',
398             'host/curtain_mode_linux.cc',
399             'host/curtain_mode_mac.cc',
400             'host/curtain_mode_win.cc',
401             'host/posix/signal_handler.cc',
402             'host/posix/signal_handler.h',
403           ],
404           'conditions': [
405             ['os_posix != 1', {
406               'sources/': [
407                 ['exclude', '^host/posix/'],
408               ],
409             }],
410           ],  # end of 'conditions'
411         },  # end of target 'remoting_me2me_host_static'
412       ] # end of targets
413     }], # end of enable_me2me_host==1
415     ['enable_it2me_host==1', {
416       'targets': [
417         {
418           # GN version: //remoting/host/it2me:common
419           'target_name': 'remoting_it2me_host_static',
420           'type': 'static_library',
421           'variables': { 'enable_wexit_time_destructors': 1, },
422           'dependencies': [
423             '../base/base.gyp:base_i18n',
424             '../net/net.gyp:net',
425             'remoting_base',
426             'remoting_host',
427             'remoting_infoplist_strings',
428             'remoting_protocol',
429             'remoting_resources',
430           ],
431           'defines': [
432             'VERSION=<(version_full)',
433           ],
434           'sources': [
435             '<@(remoting_it2me_host_static_sources)',
436           ],
437         },  # end of target 'remoting_it2me_host_static'
438       ] # end of targets
439     }], # end of 'enable_it2me_host==1'
441     ['OS!="win" and enable_me2me_host==1', {
442       'targets': [
443         {
444           'target_name': 'remoting_me2me_host',
445           'type': 'executable',
446           'variables': { 'enable_wexit_time_destructors': 1, },
447           'dependencies': [
448             '../base/base.gyp:base',
449             '../base/base.gyp:base_i18n',
450             '<(icu_gyp_path):icudata',
451             '../net/net.gyp:net',
452             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
453             'remoting_base',
454             'remoting_breakpad',
455             'remoting_host',
456             'remoting_infoplist_strings',
457             'remoting_me2me_host_static',
458             'remoting_protocol',
459           ],
460           'defines': [
461             'VERSION=<(version_full)',
462           ],
463           'sources': [
464             'host/host_main.cc',
465             'host/host_main.h',
466           ],
467           'conditions': [
468             ['OS=="mac"', {
469               'mac_bundle': 1,
470               'variables': {
471                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
472               },
473               'xcode_settings': {
474                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
475                 'INFOPLIST_PREPROCESS': 'YES',
476                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
477               },
478               'mac_bundle_resources': [
479                 '<(PRODUCT_DIR)/icudtl.dat',
480                 'host/disconnect_window.xib',
481                 'host/remoting_me2me_host.icns',
482                 'host/remoting_me2me_host-Info.plist',
483                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
485                 # Localized strings for 'Info.plist'
486                 '<!@pymod_do_main(remoting_localize --locale_output '
487                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
488                     '--print_only <(remoting_locales))',
489               ],
490               'mac_bundle_resources!': [
491                 'host/remoting_me2me_host-Info.plist',
492               ],
493               'conditions': [
494                 ['mac_breakpad==1', {
495                   'variables': {
496                     # A real .dSYM is needed for dump_syms to operate on.
497                     'mac_real_dsym': 1,
498                   },
499                   'copies': [
500                     {
501                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
502                       'files': [
503                         '<(PRODUCT_DIR)/crash_inspector',
504                         '<(PRODUCT_DIR)/crash_report_sender.app'
505                       ],
506                     },
507                   ],
508                   'dependencies': [
509                     '../breakpad/breakpad.gyp:dump_syms',
510                   ],
511                   'postbuilds': [
512                     {
513                       'postbuild_name': 'Dump Symbols',
514                       'variables': {
515                         'dump_product_syms_path':
516                             'scripts/mac/dump_product_syms',
517                       },
518                       'action': [
519                         '<(dump_product_syms_path)',
520                         '<(version_full)',
521                       ],
522                     },  # end of postbuild 'dump_symbols'
523                   ],  # end of 'postbuilds'
524                 }],  # mac_breakpad==1
525               ],  # conditions
526             }],  # OS=mac
527             ['OS=="linux" and use_allocator!="none"', {
528               'dependencies': [
529                 '../base/allocator/allocator.gyp:allocator',
530               ],
531             }],  # OS=linux
532           ],  # end of 'conditions'
533         },  # end of target 'remoting_me2me_host'
534         {
535           'target_name': 'remoting_me2me_native_messaging_host',
536           'type': 'executable',
537           'product_name': 'native_messaging_host',
538           'variables': { 'enable_wexit_time_destructors': 1, },
539           'dependencies': [
540             '../base/base.gyp:base',
541             'remoting_breakpad',
542             'remoting_host',
543             'remoting_host_setup_base',
544             'remoting_infoplist_strings',
545             'remoting_native_messaging_base',
546           ],
547           'defines': [
548             'VERSION=<(version_full)',
549           ],
550           'sources': [
551             'host/setup/me2me_native_messaging_host_entry_point.cc',
552             'host/setup/me2me_native_messaging_host_main.cc',
553             'host/setup/me2me_native_messaging_host_main.h',
554           ],
555           'conditions': [
556             ['OS=="linux" and use_allocator!="none"', {
557               'dependencies': [
558                 '../base/allocator/allocator.gyp:allocator',
559               ],
560             }],
561             ['OS=="mac"', {
562               'mac_bundle': 1,
563               'variables': {
564                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
565               },
566               'xcode_settings': {
567                 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
568                 'INFOPLIST_PREPROCESS': 'YES',
569                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
570               },
571               'mac_bundle_resources': [
572                 'host/setup/native_messaging_host-Info.plist',
573                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
575                 # Localized strings for 'Info.plist'
576                 '<!@pymod_do_main(remoting_localize --locale_output '
577                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
578                     '--print_only <(remoting_locales))',
579               ],
580               'mac_bundle_resources!': [
581                 'host/setup/native_messaging_host-Info.plist',
582               ],
583               'conditions': [
584                 ['mac_breakpad==1', {
585                   'variables': {
586                     # A real .dSYM is needed for dump_syms to operate on.
587                     'mac_real_dsym': 1,
588                   },
589                   'copies': [
590                     {
591                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
592                       'files': [
593                         '<(PRODUCT_DIR)/crash_inspector',
594                         '<(PRODUCT_DIR)/crash_report_sender.app'
595                       ],
596                     },
597                   ],
598                   'dependencies': [
599                     '../breakpad/breakpad.gyp:dump_syms',
600                   ],
601                   'postbuilds': [
602                     {
603                       'postbuild_name': 'Dump Symbols',
604                       'variables': {
605                         'dump_product_syms_path':
606                             'scripts/mac/dump_product_syms',
607                       },
608                       'action': [
609                         '<(dump_product_syms_path)',
610                         '<(version_full)',
611                       ],
612                     },  # end of postbuild 'dump_symbols'
613                   ],  # end of 'postbuilds'
614                 }],  # mac_breakpad==1
615               ],  # conditions
616             }],  # OS=mac
617           ],
618         },  # end of target 'remoting_me2me_native_messaging_host'
619       ], # targets
620     }], # end of OS!="win" and enable_me2me_host==1
622     ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
623       'targets': [
624         {
625           'target_name': 'remoting_it2me_native_messaging_host',
626           'type': 'executable',
627           'product_name': 'remote_assistance_host',
628           'variables': { 'enable_wexit_time_destructors': 1, },
629           'dependencies': [
630             '../base/base.gyp:base',
631             'remoting_base',
632             'remoting_breakpad',
633             'remoting_host',
634             'remoting_it2me_host_static',
635             'remoting_native_messaging_base',
636             'remoting_protocol',
637           ],
638           'defines': [
639             'VERSION=<(version_full)',
640           ],
641           'sources': [
642             'host/it2me/it2me_native_messaging_host_entry_point.cc',
643             'host/it2me/it2me_native_messaging_host_main.cc',
644             'host/it2me/it2me_native_messaging_host_main.h',
645           ],
646           'conditions': [
647             ['OS=="linux" and chromeos==0 and use_ozone==0', {
648               'dependencies': [
649                 # Always use GTK on Linux, even for Aura builds.
650                 '../build/linux/system.gyp:gtk',
651               ],
652             }],
653             ['OS=="linux" and use_allocator!="none"', {
654               'dependencies': [
655                 '../base/allocator/allocator.gyp:allocator',
656               ],
657             }],
658             ['OS=="mac"', {
659               'mac_bundle': 1,
660               'variables': {
661                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
662               },
663               'xcode_settings': {
664                 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
665                 'INFOPLIST_PREPROCESS': 'YES',
666                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
667               },
668               'mac_bundle_resources': [
669                 '<(PRODUCT_DIR)/icudtl.dat',
670                 'host/disconnect_window.xib',
671                 'host/it2me/remote_assistance_host-Info.plist',
672                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
674                 # Localized strings for 'Info.plist'
675                 '<!@pymod_do_main(remoting_localize --locale_output '
676                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
677                     '--print_only <(remoting_locales))',
678               ],
679               'mac_bundle_resources!': [
680                 'host/it2me/remote_assistance_host-Info.plist',
681               ],
682               'conditions': [
683                 ['mac_breakpad==1', {
684                   'variables': {
685                     # A real .dSYM is needed for dump_syms to operate on.
686                     'mac_real_dsym': 1,
687                   },
688                   'copies': [
689                     {
690                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
691                       'files': [
692                         '<(PRODUCT_DIR)/crash_inspector',
693                         '<(PRODUCT_DIR)/crash_report_sender.app'
694                       ],
695                     },
696                   ],
697                   'dependencies': [
698                     '../breakpad/breakpad.gyp:dump_syms',
699                   ],
700                   'postbuilds': [
701                     {
702                       'postbuild_name': 'Dump Symbols',
703                       'variables': {
704                         'dump_product_syms_path':
705                             'scripts/mac/dump_product_syms',
706                       },
707                       'action': [
708                         '<(dump_product_syms_path)',
709                         '<(version_full)',
710                       ],
711                     },  # end of postbuild 'dump_symbols'
712                   ],  # end of 'postbuilds'
713                 }],  # mac_breakpad==1
714               ],  # conditions
715             }],  # OS=mac
716           ],
717         },  # end of target 'remoting_it2me_native_messaging_host'
718       ],  # end of 'targets'
719     }],  # # end of OS!="win" and enable_it2me_host==1
721   ],  # end of 'conditions'