Update function names in BrowserContextKeyedServiceFactory::GetServiceForBrowserConte...
[chromium-blink-merge.git] / remoting / remoting.gyp
blobbd877561610f3c4f4af8597a7c41bc4d7bf5735d
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   'variables': {
7     'chromium_code': 1,
9     'variables': {
10       'conditions': [
11         # Enable the multi-process host on Windows by default.
12         ['OS=="win"', {
13           'remoting_multi_process%': 1,
14         }, {
15           'remoting_multi_process%': 0,
16         }],
17       ],
18     },
20     'remoting_multi_process%': '<(remoting_multi_process)',
21     'remoting_rdp_session%': 1,
23     # The |major|, |build| and |patch| versions are inherited from Chrome.
24     # Since Chrome's |minor| version is always '0', we replace it with a
25     # Chromoting-specific patch version.
26     # Note that we check both the |chrome_version_path| file and the
27     # |remoting_version_path| so that we can override the Chrome version
28     # numbers if needed.
29     'version_py_path': '../chrome/tools/build/version.py',
30     'remoting_version_path': '../remoting/VERSION',
31     'chrome_version_path': '../chrome/VERSION',
32     'version_major':
33       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@MAJOR@")',
34     'version_minor':
35       '<!(python <(version_py_path) -f <(remoting_version_path) -t "@REMOTING_PATCH@")',
36     'version_short':
37       '<(version_major).<(version_minor).'
38       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@BUILD@")',
39     'version_full':
40       '<(version_short).'
41       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@PATCH@")',
43     'branding_path': '../remoting/branding_<(branding)',
44     'copyright_info': '<!(python <(version_py_path) -f <(branding_path) -t "@COPYRIGHT@")',
46     'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
48     # Use consistent strings across all platforms.
49     # These values must match host/plugin/constants.h
50     'host_plugin_mime_type': 'application/vnd.chromium.remoting-host',
51     'host_plugin_description': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_DESCRIPTION@")',
52     'host_plugin_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
54     'conditions': [
55       # Remoting host is supported only on Windows, OSX and Linux (with X11).
56       ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0 and use_x11==1)', {
57         'enable_remoting_host': 1,
58       }, {
59         'enable_remoting_host': 0,
60       }],
61       ['OS=="mac"', {
62         'mac_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_BUNDLE_ID@")',
63         'mac_creator': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_CREATOR@")',
64         'host_plugin_extension': 'plugin',
65         'host_plugin_prefix': '',
66       }],
67       ['os_posix == 1 and OS != "mac" and target_arch == "ia32"', {
68         # linux 32 bit
69         'host_plugin_extension': 'ia32.so',
70         'host_plugin_prefix': 'lib',
71       }],
72       ['os_posix == 1 and OS != "mac" and target_arch == "x64"', {
73         # linux 64 bit
74         'host_plugin_extension': 'x64.so',
75         'host_plugin_prefix': 'lib',
76       }],
77       ['os_posix == 1 and OS != "mac" and target_arch == "arm"', {
78         'host_plugin_extension': 'arm.so',
79         'host_plugin_prefix': 'lib',
80       }],
81       ['os_posix == 1 and OS != "mac" and target_arch == "mipsel"', {
82         'host_plugin_extension': 'mipsel.so',
83         'host_plugin_prefix': 'lib',
84       }],
85       ['OS=="win"', {
86         'host_plugin_extension': 'dll',
87         'host_plugin_prefix': '',
88       }],
89       ['OS=="win"', {
90         # Use auto-generated CLSIDs to make sure that the newly installed COM
91         # classes will be used during/after upgrade even if there are old
92         # instances running already.
93         # The parameter passed to uuidgen.py is ignored, but needed to make sure
94         # that the script will be invoked separately for each CLSID. Otherwise
95         # GYP will reuse the value returned by the first invocation of
96         # the script.
97         'daemon_controller_clsid': '<!(python tools/uuidgen.py 1)',
98         'rdp_desktop_session_clsid': '<!(python tools/uuidgen.py 2)',
99       }],
100     ],
101     'remoting_webapp_locale_files': [
102       '<(webapp_locale_dir)/ar/messages.json',
103       '<(webapp_locale_dir)/bg/messages.json',
104       '<(webapp_locale_dir)/ca/messages.json',
105       '<(webapp_locale_dir)/cs/messages.json',
106       '<(webapp_locale_dir)/da/messages.json',
107       '<(webapp_locale_dir)/de/messages.json',
108       '<(webapp_locale_dir)/el/messages.json',
109       '<(webapp_locale_dir)/en/messages.json',
110       '<(webapp_locale_dir)/en_GB/messages.json',
111       '<(webapp_locale_dir)/es/messages.json',
112       '<(webapp_locale_dir)/es_419/messages.json',
113       '<(webapp_locale_dir)/et/messages.json',
114       '<(webapp_locale_dir)/fi/messages.json',
115       '<(webapp_locale_dir)/fil/messages.json',
116       '<(webapp_locale_dir)/fr/messages.json',
117       '<(webapp_locale_dir)/he/messages.json',
118       '<(webapp_locale_dir)/hi/messages.json',
119       '<(webapp_locale_dir)/hr/messages.json',
120       '<(webapp_locale_dir)/hu/messages.json',
121       '<(webapp_locale_dir)/id/messages.json',
122       '<(webapp_locale_dir)/it/messages.json',
123       '<(webapp_locale_dir)/ja/messages.json',
124       '<(webapp_locale_dir)/ko/messages.json',
125       '<(webapp_locale_dir)/lt/messages.json',
126       '<(webapp_locale_dir)/lv/messages.json',
127       '<(webapp_locale_dir)/nb/messages.json',
128       '<(webapp_locale_dir)/nl/messages.json',
129       '<(webapp_locale_dir)/pl/messages.json',
130       '<(webapp_locale_dir)/pt_BR/messages.json',
131       '<(webapp_locale_dir)/pt_PT/messages.json',
132       '<(webapp_locale_dir)/ro/messages.json',
133       '<(webapp_locale_dir)/ru/messages.json',
134       '<(webapp_locale_dir)/sk/messages.json',
135       '<(webapp_locale_dir)/sl/messages.json',
136       '<(webapp_locale_dir)/sr/messages.json',
137       '<(webapp_locale_dir)/sv/messages.json',
138       '<(webapp_locale_dir)/th/messages.json',
139       '<(webapp_locale_dir)/tr/messages.json',
140       '<(webapp_locale_dir)/uk/messages.json',
141       '<(webapp_locale_dir)/vi/messages.json',
142       '<(webapp_locale_dir)/zh_CN/messages.json',
143       '<(webapp_locale_dir)/zh_TW/messages.json',
144     ],
145     'remoting_webapp_files': [
146       'resources/chromoting16.webp',
147       'resources/chromoting48.webp',
148       'resources/chromoting128.webp',
149       'resources/disclosure_arrow_down.webp',
150       'resources/disclosure_arrow_right.webp',
151       'resources/host_setup_instructions.webp',
152       'resources/icon_cross.webp',
153       'resources/icon_host.webp',
154       'resources/icon_pencil.webp',
155       'resources/icon_warning.webp',
156       'resources/infographic_my_computers.webp',
157       'resources/infographic_remote_assistance.webp',
158       'resources/tick.webp',
159       'webapp/connection_history.css',
160       'webapp/connection_stats.css',
161       'webapp/main.css',
162       'webapp/main.html',
163       'webapp/manifest.json',
164       'webapp/menu_button.css',
165       'webapp/oauth2_callback.html',
166       'webapp/open_sans.css',
167       'webapp/open_sans.woff',
168       'webapp/scale-to-fit.webp',
169       'webapp/spinner.gif',
170       'webapp/toolbar.css',
171       'webapp/wcs_sandbox.html',
172     ],
173     'remoting_webapp_js_files': [
174       'webapp/butter_bar.js',
175       'webapp/client_plugin.js',
176       'webapp/client_plugin_async.js',
177       'webapp/client_screen.js',
178       'webapp/client_session.js',
179       'webapp/clipboard.js',
180       'webapp/connection_history.js',
181       'webapp/connection_stats.js',
182       'webapp/cs_oauth2_trampoline.js',
183       'webapp/cs_third_party_auth_trampoline.js',
184       'webapp/error.js',
185       'webapp/event_handlers.js',
186       'webapp/format_iq.js',
187       'webapp/host.js',
188       'webapp/host_controller.js',
189       'webapp/host_dispatcher.js',
190       'webapp/host_list.js',
191       'webapp/host_native_messaging.js',
192       'webapp/host_screen.js',
193       'webapp/host_session.js',
194       'webapp/host_settings.js',
195       'webapp/host_setup_dialog.js',
196       'webapp/host_table_entry.js',
197       'webapp/l10n.js',
198       'webapp/log_to_server.js',
199       'webapp/menu_button.js',
200       'webapp/oauth2.js',
201       'webapp/oauth2_callback.js',
202       'webapp/plugin_settings.js',
203       'webapp/remoting.js',
204       'webapp/server_log_entry.js',
205       'webapp/session_connector.js',
206       'webapp/stats_accumulator.js',
207       'webapp/third_party_host_permissions.js',
208       'webapp/xhr_proxy.js',
209       'webapp/third_party_token_fetcher.js',
210       'webapp/toolbar.js',
211       'webapp/ui_mode.js',
212       'webapp/wcs.js',
213       'webapp/wcs_loader.js',
214       'webapp/wcs_sandbox_container.js',
215       'webapp/wcs_sandbox_content.js',
216       'webapp/xhr.js',
217     ],
218     'remoting_host_installer_mac_roots': [
219       'host/installer/mac/',
220       '<(DEPTH)/chrome/installer/mac/',
221     ],
222     'remoting_host_installer_mac_files': [
223       'host/installer/mac/do_signing.sh',
224       'host/installer/mac/do_signing.props',
225       'host/installer/mac/ChromotingHost.pkgproj',
226       'host/installer/mac/ChromotingHostService.pkgproj',
227       'host/installer/mac/ChromotingHostUninstaller.pkgproj',
228       'host/installer/mac/LaunchAgents/org.chromium.chromoting.plist',
229       'host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh',
230       'host/installer/mac/Config/org.chromium.chromoting.conf',
231       'host/installer/mac/Scripts/keystone_install.sh',
232       'host/installer/mac/Scripts/remoting_postflight.sh',
233       'host/installer/mac/Scripts/remoting_preflight.sh',
234       'host/installer/mac/Keystone/GoogleSoftwareUpdate.pkg',
235       '<(DEPTH)/chrome/installer/mac/pkg-dmg',
236     ],
237     'remoting_host_installer_win_roots': [
238       'host/installer/win/',
239     ],
240     'remoting_host_installer_win_files': [
241       'host/installer/win/chromoting.wxs',
242       'host/installer/win/parameters.json',
243     ],
244   },
246   'includes': [
247     '../chrome/js_unittest_vars.gypi',
248   ],
250   'target_defaults': {
251     'defines': [
252     ],
253     'include_dirs': [
254       '..',  # Root of Chrome checkout
255     ],
256     'variables': {
257       'win_debug_RuntimeChecks': '0',
258     },
259     'conditions': [
260       ['OS=="mac" and mac_breakpad==1', {
261         'defines': [
262           'REMOTING_ENABLE_BREAKPAD'
263         ],
264       }],
265       ['OS=="win" and buildtype == "Official"', {
266         'defines': [
267           'REMOTING_ENABLE_BREAKPAD'
268         ],
269       }],
270       ['OS=="win" and remoting_multi_process != 0 and \
271           remoting_rdp_session != 0', {
272         'defines': [
273           'REMOTING_RDP_SESSION',
274         ],
275       }],
276       ['remoting_multi_process != 0', {
277         'defines': [
278           'REMOTING_MULTI_PROCESS',
279         ],
280       }],
281     ],
282   },
284   'conditions': [
285     ['enable_remoting_host==1', {
286       'targets': [
287         {
288           'target_name': 'remoting_host',
289           'type': 'static_library',
290           'variables': { 'enable_wexit_time_destructors': 1, },
291           'dependencies': [
292             'remoting_base',
293             'remoting_jingle_glue',
294             'remoting_protocol',
295             '../crypto/crypto.gyp:crypto',
296             '../google_apis/google_apis.gyp:google_apis',
297             '../ipc/ipc.gyp:ipc',
298             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
299           ],
300           'defines': [
301             'VERSION=<(version_full)',
302           ],
303           'sources': [
304             'host/audio_capturer.cc',
305             'host/audio_capturer.h',
306             'host/audio_capturer_linux.cc',
307             'host/audio_capturer_linux.h',
308             'host/audio_capturer_mac.cc',
309             'host/audio_capturer_win.cc',
310             'host/audio_capturer_win.h',
311             'host/audio_scheduler.cc',
312             'host/audio_scheduler.h',
313             'host/audio_silence_detector.cc',
314             'host/audio_silence_detector.h',
315             'host/basic_desktop_environment.cc',
316             'host/basic_desktop_environment.h',
317             'host/capture_scheduler.cc',
318             'host/capture_scheduler.h',
319             'host/chromoting_host.cc',
320             'host/chromoting_host.h',
321             'host/chromoting_host_context.cc',
322             'host/chromoting_host_context.h',
323             'host/chromoting_messages.cc',
324             'host/chromoting_messages.h',
325             'host/chromoting_param_traits.cc',
326             'host/chromoting_param_traits.h',
327             'host/client_session.cc',
328             'host/client_session.h',
329             'host/client_session_control.h',
330             'host/clipboard.h',
331             'host/clipboard_mac.mm',
332             'host/clipboard_win.cc',
333             'host/clipboard_x11.cc',
334             'host/config_file_watcher.cc',
335             'host/config_file_watcher.h',
336             'host/constants_mac.cc',
337             'host/constants_mac.h',
338             'host/continue_window.cc',
339             'host/continue_window.h',
340             'host/continue_window_aura.cc',
341             'host/continue_window_gtk.cc',
342             'host/continue_window_mac.mm',
343             'host/continue_window_win.cc',
344             'host/desktop_environment.h',
345             'host/desktop_resizer.h',
346             'host/desktop_resizer_linux.cc',
347             'host/desktop_resizer_mac.cc',
348             'host/desktop_resizer_win.cc',
349             'host/desktop_session_connector.h',
350             'host/desktop_session_proxy.cc',
351             'host/desktop_session_proxy.h',
352             'host/disconnect_window_aura.cc',
353             'host/disconnect_window_gtk.cc',
354             'host/disconnect_window_mac.h',
355             'host/disconnect_window_mac.mm',
356             'host/disconnect_window_win.cc',
357             'host/dns_blackhole_checker.cc',
358             'host/dns_blackhole_checker.h',
359             'host/heartbeat_sender.cc',
360             'host/heartbeat_sender.h',
361             'host/host_change_notification_listener.cc',
362             'host/host_change_notification_listener.h',
363             'host/host_config.cc',
364             'host/host_config.h',
365             'host/host_exit_codes.h',
366             'host/host_secret.cc',
367             'host/host_secret.h',
368             'host/host_status_monitor.h',
369             'host/host_status_observer.h',
370             'host/host_window.h',
371             'host/host_window_proxy.cc',
372             'host/host_window_proxy.h',
373             'host/in_memory_host_config.cc',
374             'host/in_memory_host_config.h',
375             'host/input_injector.h',
376             'host/input_injector_linux.cc',
377             'host/input_injector_mac.cc',
378             'host/input_injector_win.cc',
379             'host/ipc_audio_capturer.cc',
380             'host/ipc_audio_capturer.h',
381             'host/ipc_constants.cc',
382             'host/ipc_constants.h',
383             'host/ipc_desktop_environment.cc',
384             'host/ipc_desktop_environment.h',
385             'host/ipc_host_event_logger.cc',
386             'host/ipc_host_event_logger.h',
387             'host/ipc_input_injector.cc',
388             'host/ipc_input_injector.h',
389             'host/ipc_screen_controls.cc',
390             'host/ipc_screen_controls.h',
391             'host/ipc_util.h',
392             'host/ipc_util_posix.cc',
393             'host/ipc_util_win.cc',
394             'host/ipc_video_frame_capturer.cc',
395             'host/ipc_video_frame_capturer.h',
396             'host/it2me_desktop_environment.cc',
397             'host/it2me_desktop_environment.h',
398             'host/json_host_config.cc',
399             'host/json_host_config.h',
400             'host/linux/audio_pipe_reader.cc',
401             'host/linux/audio_pipe_reader.h',
402             'host/linux/x11_util.cc',
403             'host/linux/x11_util.h',
404             'host/linux/x_server_clipboard.cc',
405             'host/linux/x_server_clipboard.h',
406             'host/local_input_monitor.h',
407             'host/local_input_monitor_linux.cc',
408             'host/local_input_monitor_mac.mm',
409             'host/local_input_monitor_win.cc',
410             'host/log_to_server.cc',
411             'host/log_to_server.h',
412             'host/me2me_desktop_environment.cc',
413             'host/me2me_desktop_environment.h',
414             'host/mouse_clamping_filter.cc',
415             'host/mouse_clamping_filter.h',
416             'host/pairing_registry_delegate.h',
417             'host/pairing_registry_delegate_linux.cc',
418             'host/pairing_registry_delegate_linux.h',
419             'host/pairing_registry_delegate_mac.cc',
420             'host/pairing_registry_delegate_win.cc',
421             'host/pam_authorization_factory_posix.cc',
422             'host/pam_authorization_factory_posix.h',
423             'host/pin_hash.cc',
424             'host/pin_hash.h',
425             'host/policy_hack/policy_watcher.cc',
426             'host/policy_hack/policy_watcher.h',
427             'host/policy_hack/policy_watcher_linux.cc',
428             'host/policy_hack/policy_watcher_mac.mm',
429             'host/policy_hack/policy_watcher_win.cc',
430             'host/register_support_host_request.cc',
431             'host/register_support_host_request.h',
432             'host/remote_input_filter.cc',
433             'host/remote_input_filter.h',
434             'host/resizing_host_observer.cc',
435             'host/resizing_host_observer.h',
436             'host/sas_injector.h',
437             'host/sas_injector_win.cc',
438             'host/screen_controls.h',
439             'host/screen_resolution.cc',
440             'host/screen_resolution.h',
441             'host/server_log_entry.cc',
442             'host/server_log_entry.h',
443             'host/service_client.cc',
444             'host/service_client.h',
445             'host/service_urls.cc',
446             'host/service_urls.h',
447             'host/session_manager_factory.cc',
448             'host/session_manager_factory.h',
449             'host/signaling_connector.cc',
450             'host/signaling_connector.h',
451             'host/token_validator_factory_impl.cc',
452             'host/token_validator_factory_impl.h',
453             'host/ui_strings.cc',
454             'host/ui_strings.h',
455             'host/url_request_context.cc',
456             'host/url_request_context.h',
457             'host/usage_stats_consent.h',
458             'host/usage_stats_consent_mac.cc',
459             'host/usage_stats_consent_win.cc',
460             'host/video_scheduler.cc',
461             'host/video_scheduler.h',
462             'host/vlog_net_log.cc',
463             'host/vlog_net_log.h',
464             'host/win/com_security.cc',
465             'host/win/com_security.h',
466             'host/win/launch_process_with_token.cc',
467             'host/win/launch_process_with_token.h',
468             'host/win/omaha.cc',
469             'host/win/omaha.h',
470             'host/win/rdp_client.cc',
471             'host/win/rdp_client.h',
472             'host/win/rdp_client_window.cc',
473             'host/win/rdp_client_window.h',
474             'host/win/security_descriptor.cc',
475             'host/win/security_descriptor.h',
476             'host/win/session_desktop_environment.cc',
477             'host/win/session_desktop_environment.h',
478             'host/win/session_input_injector.cc',
479             'host/win/session_input_injector.h',
480             'host/win/window_station_and_desktop.cc',
481             'host/win/window_station_and_desktop.h',
482             'host/win/wts_terminal_monitor.cc',
483             'host/win/wts_terminal_monitor.h',
484             'host/win/wts_terminal_observer.h',
485           ],
486           'conditions': [
487             ['OS=="linux"', {
488               'dependencies': [
489                 # Always use GTK on Linux, even for Aura builds.
490                 #
491                 # TODO(lambroslambrou): Once the DisconnectWindow and
492                 # ContinueWindow classes have been implemented for Aura,
493                 # remove this dependency.
494                 '../build/linux/system.gyp:gtk',
495               ],
496               'link_settings': {
497                 'libraries': [
498                   '-lX11',
499                   '-lXext',
500                   '-lXfixes',
501                   '-lXtst',
502                   '-lXi',
503                   '-lXrandr',
504                   '-lpam',
505                 ],
506               },
507             }, {  # else OS != "linux"
508               'sources!': [
509                 'host/continue_window_aura.cc',
510                 'host/disconnect_window_aura.cc',
511               ],
512             }],
513             ['OS=="mac"', {
514               'sources': [
515                 '../third_party/GTM/AppKit/GTMCarbonEvent.h',
516                 '../third_party/GTM/AppKit/GTMCarbonEvent.m',
517                 '../third_party/GTM/DebugUtils/GTMDebugSelectorValidation.h',
518                 '../third_party/GTM/DebugUtils/GTMTypeCasting.h',
519                 '../third_party/GTM/Foundation/GTMObjectSingleton.h',
520                 '../third_party/GTM/GTMDefines.h',
521               ],
522               'include_dirs': [
523                 '../third_party/GTM',
524                 '../third_party/GTM/AppKit',
525                 '../third_party/GTM/DebugUtils',
526                 '../third_party/GTM/Foundation',
527               ],
528               'link_settings': {
529                 'libraries': [
530                   '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
531                   'libpam.a',
532                ],
533               },
534             }],
535             ['OS=="win"', {
536               'defines': [
537                 '_ATL_NO_EXCEPTIONS',
538                 'ISOLATION_AWARE_ENABLED=1',
539               ],
540               'dependencies': [
541                 '../sandbox/sandbox.gyp:sandbox',
542               ],
543               'msvs_settings': {
544                 'VCCLCompilerTool': {
545                   # /MP conflicts with #import directive so we limit the number
546                   # of processes to spawn to 1.
547                   'AdditionalOptions': ['/MP1'],
548                 },
549               },
550             }],
551           ],
552         },  # end of target 'remoting_host'
554         {
555           'target_name': 'remoting_me2me_host_static',
556           'type': 'static_library',
557           'variables': { 'enable_wexit_time_destructors': 1, },
558           'dependencies': [
559             '../base/base.gyp:base',
560             '../base/base.gyp:base_i18n',
561             '../net/net.gyp:net',
562             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
563             'remoting_base',
564             'remoting_breakpad',
565             'remoting_host',
566             'remoting_host_event_logger',
567             'remoting_host_logging',
568             'remoting_jingle_glue',
569           ],
570           'defines': [
571             'VERSION=<(version_full)',
572           ],
573           'sources': [
574             'host/curtain_mode.h',
575             'host/curtain_mode_linux.cc',
576             'host/curtain_mode_mac.cc',
577             'host/curtain_mode_win.cc',
578             'host/posix/signal_handler.cc',
579             'host/posix/signal_handler.h',
580           ],
581           'conditions': [
582             ['os_posix != 1', {
583               'sources/': [
584                 ['exclude', '^host/posix/'],
585               ],
586             }],
587           ],  # end of 'conditions'
588         },  # end of target 'remoting_me2me_host_static'
590         {
591           'target_name': 'remoting_host_keygen',
592           'type': 'executable',
593           'dependencies': [
594             'remoting_base',
595             '../base/base.gyp:base',
596             '../base/base.gyp:base_i18n',
597             '../crypto/crypto.gyp:crypto',
598           ],
599           'sources': [
600             'host/keygen_main.cc',
601           ],
602           'conditions': [
603             ['OS=="linux" and linux_use_tcmalloc==1', {
604               'dependencies': [
605                 '../base/allocator/allocator.gyp:allocator',
606               ],
607             }],
608           ],
609         },  # end of target 'remoting_host_keygen'
611         {
612           'target_name': 'remoting_host_setup_base',
613           'type': 'static_library',
614           'variables': { 'enable_wexit_time_destructors': 1, },
615           'dependencies': [
616             '../base/base.gyp:base',
617             '../google_apis/google_apis.gyp:google_apis',
618             'remoting_host',
619           ],
620           'defines': [
621             'VERSION=<(version_full)',
622           ],
623           'sources': [
624             'host/setup/daemon_controller.h',
625             'host/setup/daemon_controller_linux.cc',
626             'host/setup/daemon_controller_mac.mm',
627             'host/setup/daemon_controller_win.cc',
628             'host/setup/daemon_installer_win.cc',
629             'host/setup/daemon_installer_win.h',
630             'host/setup/host_starter.cc',
631             'host/setup/host_starter.h',
632             'host/setup/native_messaging_host.cc',
633             'host/setup/native_messaging_host.h',
634             'host/setup/native_messaging_reader.cc',
635             'host/setup/native_messaging_reader.h',
636             'host/setup/native_messaging_writer.cc',
637             'host/setup/native_messaging_writer.h',
638             'host/setup/oauth_helper.cc',
639             'host/setup/oauth_helper.h',
640             'host/setup/pin_validator.cc',
641             'host/setup/pin_validator.h',
642             'host/setup/test_util.cc',
643             'host/setup/test_util.h',
644             'host/setup/win/auth_code_getter.cc',
645             'host/setup/win/auth_code_getter.h',
646           ],
647           'conditions': [
648             ['OS=="win"', {
649               'dependencies': [
650                 '../google_update/google_update.gyp:google_update',
651                 'remoting_lib_idl',
652               ],
653               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
654               'msvs_disabled_warnings': [4267, ],
655             }],
656           ],
657         },  # end of target 'remoting_host_setup_base'
659         {
660           'target_name': 'remoting_host_plugin',
661           'type': 'loadable_module',
662           'variables': { 'enable_wexit_time_destructors': 1, },
663           'product_extension': '<(host_plugin_extension)',
664           'product_prefix': '<(host_plugin_prefix)',
665           'dependencies': [
666             'remoting_base',
667             'remoting_host',
668             'remoting_host_event_logger',
669             'remoting_host_logging',
670             'remoting_host_setup_base',
671             'remoting_jingle_glue',
672             '../net/net.gyp:net',
673             '../third_party/npapi/npapi.gyp:npapi',
674           ],
675           'sources': [
676             'base/dispatch_win.h',
677             'host/win/core_resource.h',
678             'host/plugin/host_log_handler.cc',
679             'host/plugin/host_log_handler.h',
680             'host/plugin/host_plugin.cc',
681             'host/plugin/host_plugin_utils.cc',
682             'host/plugin/host_plugin_utils.h',
683             'host/plugin/host_script_object.cc',
684             'host/plugin/host_script_object.h',
685           ],
686           'conditions': [
687             ['OS=="mac"', {
688               'mac_bundle': 1,
689               'xcode_settings': {
690                 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
691                 'INFOPLIST_FILE': 'host/plugin/host_plugin-Info.plist',
692                 'INFOPLIST_PREPROCESS': 'YES',
693                 # TODO(maruel): Use INFOPLIST_PREFIX_HEADER to remove the need to
694                 # duplicate string once
695                 # http://code.google.com/p/gyp/issues/detail?id=243 is fixed.
696                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'HOST_PLUGIN_MIME_TYPE="<(host_plugin_mime_type)" HOST_PLUGIN_NAME="<(host_plugin_name)" HOST_PLUGIN_DESCRIPTION="<(host_plugin_description)"',
697               },
698               # TODO(mark): Come up with a fancier way to do this.  It should
699               # only be necessary to list host_plugin-Info.plist once, not the
700               # three times it is listed here.
701               'mac_bundle_resources': [
702                 'host/disconnect_window.xib',
703                 'host/plugin/host_plugin-Info.plist',
704                 'resources/chromoting16.png',
705                 'resources/chromoting48.png',
706                 'resources/chromoting128.png',
707               ],
708               'mac_bundle_resources!': [
709                 'host/plugin/host_plugin-Info.plist',
710               ],
711               'conditions': [
712                 ['mac_breakpad==1', {
713                   'variables': {
714                     # A real .dSYM is needed for dump_syms to operate on.
715                     'mac_real_dsym': 1,
716                   },
717                 }],
718               ],  # conditions
719             }],  # OS=="mac"
720             [ 'OS=="win"', {
721               'defines': [
722                 'ISOLATION_AWARE_ENABLED=1',
723               ],
724               'dependencies': [
725                 'remoting_lib_idl',
726                 'remoting_version_resources',
727               ],
728               'include_dirs': [
729                 '<(INTERMEDIATE_DIR)',
730               ],
731               'sources': [
732                 '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_plugin_version.rc',
733                 'host/win/core.rc',
734                 'host/plugin/host_plugin.def',
735               ],
736             }],
737           ],
738         },  # end of target 'remoting_host_plugin'
740         {
741           'target_name': 'remoting_native_messaging_host',
742           'type': 'executable',
743           'variables': { 'enable_wexit_time_destructors': 1, },
744           'dependencies': [
745             '../base/base.gyp:base',
746             'remoting_host',
747             'remoting_host_logging',
748             'remoting_host_setup_base',
749           ],
750           'defines': [
751             'VERSION=<(version_full)',
752           ],
753           'sources': [
754             'host/setup/native_messaging_host_main.cc',
755           ],
756           'conditions': [
757             ['OS=="linux" and linux_use_tcmalloc==1', {
758               'dependencies': [
759                 '../base/allocator/allocator.gyp:allocator',
760               ],
761             }],
762           ],
763         },  # end of target 'remoting_native_messaging_host'
764       ],  # end of 'targets'
765     }],  # 'enable_remoting_host==1'
767     ['OS!="win" and enable_remoting_host==1', {
768       'conditions': [
769         ['OS=="linux" and branding=="Chrome" and chromeos==0', {
770           'variables': {
771             'deb_cmd': 'host/installer/linux/build-deb.sh',
772             'deb_filename': 'host/installer/<!(["<(deb_cmd)", "-p", "-s", "<(DEPTH)"])',
773             'packaging_outputs': [
774               '<(deb_filename)',
775               '<!(echo <(deb_filename) | sed -e "s/.deb$/.changes/")',
776               '<(PRODUCT_DIR)/remoting_me2me_host.debug',
777               '<(PRODUCT_DIR)/remoting_start_host.debug',
778               '<(PRODUCT_DIR)/remoting_native_messaging_host.debug',
779             ]
780           },
781           'targets': [
782             {
783               # Store the installer package(s) into a zip file so there is a
784               # consistent filename to reference for build archiving (i.e. in
785               # FILES.cfg). This also avoids possible conflicts with "wildcard"
786               # package handling in other build/signing scripts.
787               'target_name': 'remoting_me2me_host_archive',
788               'type': 'none',
789               'dependencies': [
790                 'remoting_me2me_host_deb_installer',
791               ],
792               'actions': [
793                 {
794                   #'variables': {
795                   #  'deb_cmd': 'host/installer/linux/build-deb.sh',
796                   #},
797                   'action_name': 'build_linux_installer_zip',
798                   'inputs': [
799                     '<@(packaging_outputs)',
800                   ],
801                   'outputs': [
802                     '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
803                   ],
804                   'action': [ 'zip', '-j', '-0', '<@(_outputs)', '<@(_inputs)' ],
805                 },
806               ],
807             },
808             {
809               'target_name': 'remoting_me2me_host_deb_installer',
810               'type': 'none',
811               'dependencies': [
812                 'remoting_me2me_host',
813                 'remoting_start_host',
814                 'remoting_native_messaging_host',
815               ],
816               'actions': [
817                 {
818                   'action_name': 'build_debian_package',
819                   'inputs': [
820                     '<(deb_cmd)',
821                     'host/installer/linux/Makefile',
822                     'host/installer/linux/debian/chrome-remote-desktop.init',
823                     'host/installer/linux/debian/chrome-remote-desktop.pam',
824                     'host/installer/linux/debian/compat',
825                     'host/installer/linux/debian/control',
826                     'host/installer/linux/debian/copyright',
827                     'host/installer/linux/debian/postinst',
828                     'host/installer/linux/debian/preinst',
829                     'host/installer/linux/debian/rules',
830                   ],
831                   'outputs': [
832                     '<@(packaging_outputs)',
833                   ],
834                   'action': [ '<(deb_cmd)', '-s', '<(DEPTH)' ],
835                 },
836               ],
837             },
838           ],
839         }],
840       ],
841       'targets': [
842         {
843           'target_name': 'remoting_me2me_host',
844           'type': 'executable',
845           'variables': { 'enable_wexit_time_destructors': 1, },
846           'dependencies': [
847             '../base/base.gyp:base',
848             '../base/base.gyp:base_i18n',
849             '../net/net.gyp:net',
850             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
851             'remoting_base',
852             'remoting_breakpad',
853             'remoting_host',
854             'remoting_host_event_logger',
855             'remoting_host_logging',
856             'remoting_jingle_glue',
857             'remoting_me2me_host_static',
858           ],
859           'defines': [
860             'VERSION=<(version_full)',
861           ],
862           'sources': [
863             'host/host_main.cc',
864             'host/host_main.h',
865             'host/remoting_me2me_host.cc',
866           ],
867           'conditions': [
868             ['OS=="mac"', {
869               'mac_bundle': 1,
870               'variables': {
871                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
872               },
873               'xcode_settings': {
874                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
875                 'INFOPLIST_PREPROCESS': 'YES',
876                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)" COPYRIGHT_INFO="<(copyright_info)"',
877               },
878               'mac_bundle_resources': [
879                 'host/disconnect_window.xib',
880                 'host/remoting_me2me_host.icns',
881                 'host/remoting_me2me_host-Info.plist',
882               ],
883               'mac_bundle_resources!': [
884                 'host/remoting_me2me_host-Info.plist',
885               ],
886               'conditions': [
887                 ['mac_breakpad==1', {
888                   'variables': {
889                     # A real .dSYM is needed for dump_syms to operate on.
890                     'mac_real_dsym': 1,
891                   },
892                   'copies': [
893                     {
894                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
895                       'files': [
896                         '<(PRODUCT_DIR)/crash_inspector',
897                         '<(PRODUCT_DIR)/crash_report_sender.app'
898                       ],
899                     },
900                   ],
901                   'dependencies': [
902                     '../breakpad/breakpad.gyp:dump_syms',
903                   ],
904                   'postbuilds': [
905                     {
906                       'postbuild_name': 'Dump Symbols',
907                       'variables': {
908                         'dump_product_syms_path':
909                             'scripts/mac/dump_product_syms',
910                       },
911                       'action': [
912                         '<(dump_product_syms_path)',
913                         '<(version_full)',
914                       ],
915                     },  # end of postbuild 'dump_symbols'
916                   ],  # end of 'postbuilds'
917                 }],  # mac_breakpad==1
918               ],  # conditions
919             }],  # OS=mac
920             ['OS=="linux" and linux_use_tcmalloc==1', {
921               'dependencies': [
922                 '../base/allocator/allocator.gyp:allocator',
923               ],
924             }],  # OS=linux
925           ],  # end of 'conditions'
926         },  # end of target 'remoting_me2me_host'
928       ],  # end of 'targets'
929     }],  # 'OS!="win" and enable_remoting_host==1'
932     ['OS=="linux" and chromeos==0 and enable_remoting_host==1', {
933       'targets': [
934         # Linux breakpad processing
935         {
936           'target_name': 'remoting_linux_symbols',
937           'type': 'none',
938           'conditions': [
939             ['linux_dump_symbols==1', {
940               'actions': [
941                 {
942                   'action_name': 'dump_symbols',
943                   'variables': {
944                     'plugin_file': '<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
945                   },
946                   'inputs': [
947                     '<(DEPTH)/build/linux/dump_app_syms',
948                     '<(PRODUCT_DIR)/dump_syms',
949                     '<(PRODUCT_DIR)/<(plugin_file)',
950                   ],
951                   'outputs': [
952                     '<(PRODUCT_DIR)/<(plugin_file).breakpad.<(target_arch)',
953                   ],
954                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
955                              '<(PRODUCT_DIR)/dump_syms',
956                              '<(linux_strip_binary)',
957                              '<(PRODUCT_DIR)/<(plugin_file)',
958                              '<@(_outputs)'],
959                   'message': 'Dumping breakpad symbols to <(_outputs)',
960                   'process_outputs_as_sources': 1,
961                 },
962               ],
963               'dependencies': [
964                 'remoting_host_plugin',
965                 '../breakpad/breakpad.gyp:dump_syms',
966               ],
967             }],  # 'linux_dump_symbols==1'
968           ],  # end of 'conditions'
969         },  # end of target 'linux_symbols'
970         {
971           'target_name': 'remoting_start_host',
972           'type': 'executable',
973           'dependencies': [
974             'remoting_host_setup_base',
975           ],
976           'sources': [
977             'host/setup/start_host.cc',
978           ],
979           'conditions': [
980             ['linux_use_tcmalloc==1', {
981               'dependencies': [
982                 '../base/allocator/allocator.gyp:allocator',
983               ],
984             }],
985           ],
986         },  # end of target 'remoting_start_host'
987       ],  # end of 'targets'
988     }],  # 'OS=="linux"'
990     ['OS=="mac"', {
991       'targets': [
992         {
993           'target_name': 'remoting_host_uninstaller',
994           'type': 'executable',
995           'mac_bundle': 1,
996           'variables': {
997             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_ID@")',
998             'bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_NAME@")',
999           },
1000           'dependencies': [
1001             '<(DEPTH)/base/base.gyp:base',
1002           ],
1003           'sources': [
1004             'host/constants_mac.cc',
1005             'host/constants_mac.h',
1006             'host/installer/mac/uninstaller/remoting_uninstaller.h',
1007             'host/installer/mac/uninstaller/remoting_uninstaller.mm',
1008             'host/installer/mac/uninstaller/remoting_uninstaller_app.h',
1009             'host/installer/mac/uninstaller/remoting_uninstaller_app.mm',
1010           ],
1011           'xcode_settings': {
1012             'INFOPLIST_FILE': 'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
1013             'INFOPLIST_PREPROCESS': 'YES',
1014             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_INFO="<(copyright_info)"',
1015           },
1016           'mac_bundle_resources': [
1017             'host/installer/mac/uninstaller/remoting_uninstaller.icns',
1018             'host/installer/mac/uninstaller/remoting_uninstaller.xib',
1019             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
1020           ],
1021           'mac_bundle_resources!': [
1022             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
1023           ],
1024         },  # end of target 'remoting_host_uninstaller'
1026         # This packages up the files needed for the remoting host installer so
1027         # they can be sent off to be signed.
1028         # We don't build an installer here because we don't have signed binaries.
1029         {
1030           'target_name': 'remoting_me2me_host_archive',
1031           'type': 'none',
1032           'dependencies': [
1033             'remoting_host_prefpane',
1034             'remoting_host_uninstaller',
1035             'remoting_me2me_host',
1036           ],
1037           'variables': {
1038             'host_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
1039             'host_service_name': '<!(python <(version_py_path) -f <(branding_path) -t "@DAEMON_FILE_NAME@")',
1040             'host_uninstaller_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_NAME@")',
1041             'bundle_prefix': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_PREFIX@")',
1042           },
1043           'actions': [
1044             {
1045               'action_name': 'Zip installer files for signing',
1046               'temp_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting-me2me-host',
1047               'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1048               'variables': {
1049                 'host_name_nospace': '<!(echo <(host_name) | sed "s/ //g")',
1050                 'host_service_name_nospace': '<!(echo <(host_service_name) | sed "s/ //g")',
1051                 'host_uninstaller_name_nospace': '<!(echo <(host_uninstaller_name) | sed "s/ //g")',
1052               },
1053               'generated_files': [
1054                 '<(PRODUCT_DIR)/remoting_host_prefpane.prefPane',
1055                 '<(PRODUCT_DIR)/remoting_me2me_host.app',
1056                 '<(PRODUCT_DIR)/remoting_host_uninstaller.app',
1057               ],
1058               'generated_files_dst': [
1059                 'PreferencePanes/org.chromium.chromoting.prefPane',
1060                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app',
1061                 'Applications/<(host_uninstaller_name).app',
1062               ],
1063               'source_files': [
1064                 '<@(remoting_host_installer_mac_files)',
1065               ],
1066               'defs': [
1067                 'VERSION=<(version_full)',
1068                 'VERSION_SHORT=<(version_short)',
1069                 'VERSION_MAJOR=<(version_major)',
1070                 'VERSION_MINOR=<(version_minor)',
1071                 'COPYRIGHT_INFO=<(copyright_info)',
1072                 'HOST_NAME=<(host_name)',
1073                 'HOST_SERVICE_NAME=<(host_service_name)',
1074                 'HOST_UNINSTALLER_NAME=<(host_uninstaller_name)',
1075                 'HOST_PKG=<(host_name)',
1076                 'HOST_SERVICE_PKG=<(host_service_name_nospace)',
1077                 'HOST_UNINSTALLER_PKG=<(host_uninstaller_name_nospace)',
1078                 'BUNDLE_ID_HOST=<(bundle_prefix).<(host_name_nospace)',
1079                 'BUNDLE_ID_HOST_SERVICE=<(bundle_prefix).<(host_service_name_nospace)',
1080                 'BUNDLE_ID_HOST_UNINSTALLER=<(bundle_prefix).<(host_uninstaller_name_nospace)',
1081                 'DMG_VOLUME_NAME=<(host_name) <(version_full)',
1082                 'DMG_FILE_NAME=<!(echo <(host_name) | sed "s/ //g")-<(version_full)',
1083               ],
1084               'inputs': [
1085                 'host/installer/build-installer-archive.py',
1086                 '<@(_source_files)',
1087               ],
1088               'outputs': [
1089                 '<(_zip_path)',
1090               ],
1091               'action': [
1092                 'python',
1093                 'host/installer/build-installer-archive.py',
1094                 '<(_temp_dir)',
1095                 '<(_zip_path)',
1096                 '--source-file-roots',
1097                 '<@(remoting_host_installer_mac_roots)',
1098                 '--source-files',
1099                 '<@(_source_files)',
1100                 '--generated-files',
1101                 '<@(_generated_files)',
1102                 '--generated-files-dst',
1103                 '<@(_generated_files_dst)',
1104                 '--defs',
1105                 '<@(_defs)',
1106               ],
1107             },
1108           ],  # actions
1109         }, # end of target 'remoting_me2me_host_archive'
1111         {
1112           'target_name': 'remoting_host_prefpane',
1113           'type': 'loadable_module',
1114           'mac_bundle': 1,
1115           'product_extension': 'prefPane',
1116           'defines': [
1117             'JSON_USE_EXCEPTION=0',
1118           ],
1119           'include_dirs': [
1120             '../third_party/jsoncpp/overrides/include/',
1121             '../third_party/jsoncpp/source/include/',
1122             '../third_party/jsoncpp/source/src/lib_json/',
1123           ],
1125           # These source files are included directly, instead of adding target
1126           # dependencies, because the targets are not yet built for 64-bit on
1127           # Mac OS X - http://crbug.com/125116.
1128           #
1129           # TODO(lambroslambrou): Fix this when Chrome supports building for
1130           # Mac OS X 64-bit - http://crbug.com/128122.
1131           'sources': [
1132             '../third_party/jsoncpp/source/src/lib_json/json_reader.cpp',
1133             '../third_party/jsoncpp/overrides/src/lib_json/json_value.cpp',
1134             '../third_party/jsoncpp/source/src/lib_json/json_writer.cpp',
1135             '../third_party/modp_b64/modp_b64.cc',
1136             'host/constants_mac.cc',
1137             'host/constants_mac.h',
1138             'host/host_config.cc',
1139             'host/mac/me2me_preference_pane.h',
1140             'host/mac/me2me_preference_pane.mm',
1141             'host/mac/me2me_preference_pane_confirm_pin.h',
1142             'host/mac/me2me_preference_pane_confirm_pin.mm',
1143             'host/mac/me2me_preference_pane_disable.h',
1144             'host/mac/me2me_preference_pane_disable.mm',
1145           ],
1146           'link_settings': {
1147             'libraries': [
1148               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
1149               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
1150               '$(SDKROOT)/System/Library/Frameworks/PreferencePanes.framework',
1151               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
1152             ],
1153           },
1154           'variables': {
1155             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_ID@")',
1156             'bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
1157             # The XML new-line entity splits the label into two lines, which
1158             # is the maximum number of lines allowed by the System Preferences
1159             # applet.
1160             # TODO(lambroslambrou): When these strings are localized, use "\n"
1161             # instead of "&#x0a;" for linebreaks.
1162             'pref_pane_icon_label': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_ICON_LABEL@")',
1163           },
1164           'xcode_settings': {
1165             'ARCHS': ['i386', 'x86_64'],
1166             'GCC_ENABLE_OBJC_GC': 'supported',
1167             'INFOPLIST_FILE': 'host/mac/me2me_preference_pane-Info.plist',
1168             'INFOPLIST_PREPROCESS': 'YES',
1169             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_INFO="<(copyright_info)" PREF_PANE_ICON_LABEL="<(pref_pane_icon_label)"',
1170           },
1171           'mac_bundle_resources': [
1172             'host/mac/me2me_preference_pane.xib',
1173             'host/mac/me2me_preference_pane_confirm_pin.xib',
1174             'host/mac/me2me_preference_pane_disable.xib',
1175             'host/mac/me2me_preference_pane-Info.plist',
1176             'resources/chromoting128.png',
1177           ],
1178           'mac_bundle_resources!': [
1179             'host/mac/me2me_preference_pane-Info.plist',
1180           ],
1181           'conditions': [
1182             ['mac_breakpad==1', {
1183               'variables': {
1184                 # A real .dSYM is needed for dump_syms to operate on.
1185                 'mac_real_dsym': 1,
1186               },
1187             }],  # 'mac_breakpad==1'
1188           ],  # conditions
1189         },  # end of target 'remoting_host_prefpane'
1190       ],  # end of 'targets'
1191     }],  # 'OS=="mac"'
1193     ['OS=="win"', {
1194       'targets': [
1195         {
1196           'target_name': 'remoting_breakpad_tester',
1197           'type': 'executable',
1198           'variables': { 'enable_wexit_time_destructors': 1, },
1199           'dependencies': [
1200             '../base/base.gyp:base',
1201             'remoting_host_logging',
1202           ],
1203           'sources': [
1204             'tools/breakpad_tester_win.cc',
1205           ],
1206         },  # end of target 'remoting_breakpad_tester'
1207         {
1208           'target_name': 'remoting_lib_idl',
1209           'type': 'static_library',
1210           'sources': [
1211             'host/win/chromoting_lib_idl.templ',
1212             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h',
1213             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
1214             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_i.c',
1215           ],
1216           # This target exports a hard dependency because dependent targets may
1217           # include chromoting_lib.h, a generated header.
1218           'hard_dependency': 1,
1219           'msvs_settings': {
1220             'VCMIDLTool': {
1221               'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
1222             },
1223           },
1224           'direct_dependent_settings': {
1225             'include_dirs': [
1226               '<(SHARED_INTERMEDIATE_DIR)',
1227             ],
1228           },
1229           'rules': [
1230             {
1231               'rule_name': 'generate_idl',
1232               'extension': 'templ',
1233               'outputs': [
1234                 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
1235               ],
1236               'action': [
1237                 'python',
1238                 '<(version_py_path)',
1239                 '-e', "DAEMON_CONTROLLER_CLSID='<(daemon_controller_clsid)'",
1240                 '-e', "RDP_DESKTOP_SESSION_CLSID='<(rdp_desktop_session_clsid)'",
1241                 '<(RULE_INPUT_PATH)',
1242                 '<@(_outputs)',
1243               ],
1244               'process_outputs_as_sources': 1,
1245               'message': 'Generating <@(_outputs)',
1246               'msvs_cygwin_shell': 0,
1247             },
1248           ],
1249         },  # end of target 'remoting_lib_idl'
1251         # remoting_lib_ps builds the proxy/stub code generated by MIDL (see
1252         # remoting_lib_idl).
1253         {
1254           'target_name': 'remoting_lib_ps',
1255           'type': 'static_library',
1256           'defines': [
1257             # Prepend 'Ps' to the MIDL-generated routines. This includes
1258             # DllGetClassObject, DllCanUnloadNow, DllRegisterServer,
1259             # DllUnregisterServer, and DllMain.
1260             'ENTRY_PREFIX=Ps',
1261             'REGISTER_PROXY_DLL',
1262           ],
1263           'dependencies': [
1264             'remoting_lib_idl',
1265           ],
1266           'sources': [
1267             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.dlldata.c',
1268             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_p.c',
1269           ],
1270         },  # end of target 'remoting_lib_ps'
1272         # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
1273         # into remoting_core.dll's resources) every time
1274         # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
1275         # both this and 'remoting_lib_idl' targets ensures that the resorces
1276         # are rebuilt every time the type library is updated. GYP alone is
1277         # not smart enough to figure out this dependency on its own.
1278         {
1279           'target_name': 'remoting_lib_rc',
1280           'type': 'none',
1281           'sources': [
1282             'host/win/chromoting_lib_idl.templ',
1283           ],
1284           'hard_dependency': 1,
1285           'direct_dependent_settings': {
1286             'include_dirs': [
1287               '<(SHARED_INTERMEDIATE_DIR)',
1288             ],
1289           },
1290           'rules': [
1291             {
1292               'rule_name': 'generate_rc',
1293               'extension': 'templ',
1294               'outputs': [
1295                 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
1296               ],
1297               'action': [
1298                 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
1299               ],
1300               'message': 'Generating <@(_outputs)',
1301               'msvs_cygwin_shell': 0,
1302             },
1303           ],
1304         },  # end of target 'remoting_lib_rc'
1305         {
1306           'target_name': 'remoting_configurer',
1307           'type': 'executable',
1308           'defines': [
1309             '_ATL_NO_EXCEPTIONS',
1310           ],
1311           'dependencies': [
1312             '../base/base.gyp:base',
1313             '../crypto/crypto.gyp:crypto',
1314             'remoting_host',
1315             'remoting_host_setup_base',
1316           ],
1317           'sources': [
1318             'host/branding.cc',
1319             'host/setup/win/host_configurer.cc',
1320             'host/setup/win/host_configurer.rc',
1321             'host/setup/win/host_configurer_window.cc',
1322             'host/setup/win/host_configurer_window.h',
1323             'host/setup/win/host_configurer_resource.h',
1324             'host/setup/win/load_string_from_resource.cc',
1325             'host/setup/win/load_string_from_resource.h',
1326             'host/setup/win/start_host_window.cc',
1327             'host/setup/win/start_host_window.h',
1328           ],
1329           'msvs_settings': {
1330             'VCLinkerTool': {
1331               'AdditionalOptions': [
1332                 "\"/manifestdependency:type='win32' "
1333                     "name='Microsoft.Windows.Common-Controls' "
1334                     "version='6.0.0.0' "
1335                     "processorArchitecture='*' "
1336                     "publicKeyToken='6595b64144ccf1df' language='*'\"",
1337               ],
1338               # 2 == /SUBSYSTEM:WINDOWS
1339               'SubSystem': '2',
1340             },
1341           },
1342         },  # end of target 'remoting_configurer'
1343         # The only difference between |remoting_console.exe| and
1344         # |remoting_host.exe| is that the former is a console application.
1345         # |remoting_console.exe| is used for debugging purposes.
1346         {
1347           'target_name': 'remoting_console',
1348           'type': 'executable',
1349           'variables': { 'enable_wexit_time_destructors': 1, },
1350           'dependencies': [
1351             'remoting_core',
1352             'remoting_version_resources',
1353           ],
1354           'sources': [
1355             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_version.rc',
1356             'host/win/entry_point.cc',
1357           ],
1358           'msvs_settings': {
1359             'VCLinkerTool': {
1360               'EntryPointSymbol': 'HostEntryPoint',
1361               'IgnoreAllDefaultLibraries': 'true',
1362               'SubSystem': '1', # /SUBSYSTEM:CONSOLE
1363             },
1364           },
1365         },  # end of target 'remoting_console'
1366         {
1367           'target_name': 'remoting_console_manifest',
1368           'type': 'none',
1369           'dependencies': [
1370             'remoting_console',
1371           ],
1372           'hard_dependency': '1',
1373           'msvs_cygwin_shell': 0,
1374           'actions': [
1375             {
1376               'action_name': 'Embedding manifest into remoting_console.exe',
1377               'binary': '<(PRODUCT_DIR)/remoting_console.exe',
1378               'manifests': [
1379                 'host/win/dpi_aware.manifest',
1380               ],
1381               'inputs': [
1382                 '<(_binary)',
1383                 '<@(_manifests)',
1384               ],
1385               'outputs': [
1386                 '<(_binary).embedded.manifest',
1387               ],
1388               'action': [
1389                 'mt',
1390                 '-nologo',
1391                 '-manifest',
1392                 '<@(_manifests)',
1393                 '-outputresource:<(_binary);#1',
1394                 '-out:<(_binary).embedded.manifest',
1395               ],
1396             },
1397           ],  # actions
1398         },  # end of target 'remoting_console_manifest'
1399         {
1400           'target_name': 'remoting_core',
1401           'type': 'shared_library',
1402           'variables': { 'enable_wexit_time_destructors': 1, },
1403           'defines' : [
1404             '_ATL_APARTMENT_THREADED',
1405             '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
1406             '_ATL_NO_AUTOMATIC_NAMESPACE',
1407             '_ATL_NO_EXCEPTIONS',
1408             'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
1409             'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
1410             'HOST_IMPLEMENTATION',
1411             'ISOLATION_AWARE_ENABLED=1',
1412             'STRICT',
1413             'VERSION=<(version_full)',
1414           ],
1415           'dependencies': [
1416             '../base/base.gyp:base',
1417             '../base/base.gyp:base_static',
1418             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1419             '../ipc/ipc.gyp:ipc',
1420             '../net/net.gyp:net',
1421             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
1422             'remoting_base',
1423             'remoting_breakpad',
1424             'remoting_host',
1425             'remoting_host_event_logger',
1426             'remoting_host_logging',
1427             'remoting_lib_idl',
1428             'remoting_lib_ps',
1429             'remoting_lib_rc',
1430             'remoting_me2me_host_static',
1431             'remoting_protocol',
1432             'remoting_version_resources',
1433             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
1434           ],
1435           'sources': [
1436             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
1437             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
1438             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_core_version.rc',
1439             'host/chromoting_messages.cc',
1440             'host/chromoting_messages.h',
1441             'host/config_file_watcher.cc',
1442             'host/config_file_watcher.h',
1443             'host/daemon_process.cc',
1444             'host/daemon_process.h',
1445             'host/daemon_process_win.cc',
1446             'host/desktop_process.cc',
1447             'host/desktop_process.h',
1448             'host/desktop_process_main.cc',
1449             'host/desktop_session.cc',
1450             'host/desktop_session.h',
1451             'host/desktop_session_agent.cc',
1452             'host/desktop_session_agent.h',
1453             'host/desktop_session_win.cc',
1454             'host/desktop_session_win.h',
1455             'host/host_exit_codes.h',
1456             'host/host_export.h',
1457             'host/host_main.cc',
1458             'host/host_main.h',
1459             'host/ipc_constants.cc',
1460             'host/ipc_constants.h',
1461             'host/remoting_me2me_host.cc',
1462             'host/sas_injector.h',
1463             'host/sas_injector_win.cc',
1464             'host/verify_config_window_win.cc',
1465             'host/verify_config_window_win.h',
1466             'host/win/chromoting_module.cc',
1467             'host/win/chromoting_module.h',
1468             'host/win/core.cc',
1469             'host/win/core.rc',
1470             'host/win/core_resource.h',
1471             'host/win/elevated_controller.cc',
1472             'host/win/elevated_controller.h',
1473             'host/win/host_service.cc',
1474             'host/win/host_service.h',
1475             'host/win/omaha.cc',
1476             'host/win/omaha.h',
1477             'host/win/rdp_desktop_session.cc',
1478             'host/win/rdp_desktop_session.h',
1479             'host/win/unprivileged_process_delegate.cc',
1480             'host/win/unprivileged_process_delegate.h',
1481             'host/win/worker_process_launcher.cc',
1482             'host/win/worker_process_launcher.h',
1483             'host/win/wts_session_process_delegate.cc',
1484             'host/win/wts_session_process_delegate.h',
1485             'host/worker_process_ipc_delegate.h',
1486           ],
1487           'msvs_settings': {
1488             'VCLinkerTool': {
1489               'AdditionalDependencies': [
1490                 'comctl32.lib',
1491                 'rpcns4.lib',
1492                 'rpcrt4.lib',
1493                 'uuid.lib',
1494                 'wtsapi32.lib',
1495               ],
1496               # Export the proxy/stub entry points. Note that the generated
1497               # routines have 'Ps' prefix to avoid conflicts with our own
1498               # DllMain().
1499               'AdditionalOptions': [
1500                 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
1501                 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
1502                 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
1503                 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
1504               ],
1505             },
1506           },
1507         },  # end of target 'remoting_core'
1508         {
1509           'target_name': 'remoting_core_manifest',
1510           'type': 'none',
1511           'dependencies': [
1512             'remoting_core',
1513           ],
1514           'hard_dependency': '1',
1515           'msvs_cygwin_shell': 0,
1516           'actions': [
1517             {
1518               'action_name': 'Embedding manifest into remoting_core.dll',
1519               'binary': '<(PRODUCT_DIR)/remoting_core.dll',
1520               'manifests': [
1521                 'host/win/comctl32_v6.manifest',
1522               ],
1523               'inputs': [
1524                 '<(_binary)',
1525                 '<@(_manifests)',
1526               ],
1527               'outputs': [
1528                 '<(_binary).embedded.manifest',
1529               ],
1530               'action': [
1531                 'mt',
1532                 '-nologo',
1533                 '-manifest',
1534                 '<@(_manifests)',
1535                 '-outputresource:<(_binary);#2',
1536                 '-out:<(_binary).embedded.manifest',
1537               ],
1538             },
1539           ],  # actions
1540         },  # end of target 'remoting_core_manifest'
1541         {
1542           'target_name': 'remoting_desktop',
1543           'type': 'executable',
1544           'variables': { 'enable_wexit_time_destructors': 1, },
1545           'dependencies': [
1546             'remoting_core',
1547             'remoting_version_resources',
1548           ],
1549           'sources': [
1550             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_desktop_version.rc',
1551             'host/win/entry_point.cc',
1552           ],
1553           'msvs_settings': {
1554             'VCLinkerTool': {
1555               'EntryPointSymbol': 'HostEntryPoint',
1556               'IgnoreAllDefaultLibraries': 'true',
1557               'SubSystem': '2', # /SUBSYSTEM:WINDOWS
1558             },
1559           },
1560         },  # end of target 'remoting_desktop'
1561         {
1562           'target_name': 'remoting_desktop_manifest',
1563           'type': 'none',
1564           'dependencies': [
1565             'remoting_desktop',
1566           ],
1567           'hard_dependency': '1',
1568           'msvs_cygwin_shell': 0,
1569           'actions': [
1570             {
1571               'action_name': 'Embedding manifest into remoting_desktop.exe',
1572               'binary': '<(PRODUCT_DIR)/remoting_desktop.exe',
1573               'manifests': [
1574                 'host/win/dpi_aware.manifest',
1575               ],
1576               # Add 'level="requireAdministrator" uiAccess="true"' to
1577               # the manifest only for the official builds because it requires
1578               # the binary to be signed to work.
1579               'conditions': [
1580                 ['buildtype == "Official"', {
1581                   'manifests': [
1582                     'host/win/require_administrator.manifest',
1583                   ],
1584                 }],
1585               ],
1586               'inputs': [
1587                 '<(_binary)',
1588                 '<@(_manifests)',
1589               ],
1590               'outputs': [
1591                 '<(_binary).embedded.manifest',
1592               ],
1593               'action': [
1594                 'mt',
1595                 '-nologo',
1596                 '-manifest',
1597                 '<@(_manifests)',
1598                 '-outputresource:<(_binary);#1',
1599                 '-out:<(_binary).embedded.manifest',
1600               ],
1601             },
1602           ],  # actions
1603         },  # end of target 'remoting_desktop_manifest'
1604         {
1605           'target_name': 'remoting_host_exe',
1606           'product_name': 'remoting_host',
1607           'type': 'executable',
1608           'variables': { 'enable_wexit_time_destructors': 1, },
1609           'dependencies': [
1610             'remoting_core',
1611             'remoting_version_resources',
1612           ],
1613           'sources': [
1614             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_version.rc',
1615             'host/win/entry_point.cc',
1616           ],
1617           'msvs_settings': {
1618             'VCLinkerTool': {
1619               'EntryPointSymbol': 'HostEntryPoint',
1620               'IgnoreAllDefaultLibraries': 'true',
1621               'ImportLibrary': '$(OutDir)\\lib\\remoting_host_exe.lib',
1622               'OutputFile': '$(OutDir)\\remoting_host.exe',
1623               'SubSystem': '2', # /SUBSYSTEM:WINDOWS
1624             },
1625           },
1626         },  # end of target 'remoting_host_exe'
1627         {
1628           'target_name': 'remoting_host_manifest',
1629           'type': 'none',
1630           'dependencies': [
1631             'remoting_host_exe',
1632           ],
1633           'hard_dependency': '1',
1634           'msvs_cygwin_shell': 0,
1635           'actions': [
1636             {
1637               'action_name': 'Embedding manifest into remoting_host.exe',
1638               'binary': '<(PRODUCT_DIR)/remoting_host.exe',
1639               'manifests': [
1640                 'host/win/dpi_aware.manifest',
1641               ],
1642               'inputs': [
1643                 '<(_binary)',
1644                 '<@(_manifests)',
1645               ],
1646               'outputs': [
1647                 '<(_binary).embedded.manifest',
1648               ],
1649               'action': [
1650                 'mt',
1651                 '-nologo',
1652                 '-manifest',
1653                 '<@(_manifests)',
1654                 '-outputresource:<(_binary);#1',
1655                 '-out:<(_binary).embedded.manifest',
1656               ],
1657             },
1658           ],  # actions
1659         },  # end of target 'remoting_host_manifest'
1661         {
1662           'target_name': 'remoting_host_plugin_manifest',
1663           'type': 'none',
1664           'dependencies': [
1665             'remoting_host_plugin',
1666           ],
1667           'hard_dependency': '1',
1668           'msvs_cygwin_shell': 0,
1669           'actions': [
1670             {
1671               'action_name': 'Embedding manifest into remoting_host_plugin.dll',
1672               'binary': '<(PRODUCT_DIR)/remoting_host_plugin.dll',
1673               'manifests': [
1674                 'host/win/comctl32_v6.manifest',
1675               ],
1676               'inputs': [
1677                 '<(_binary)',
1678                 '<@(_manifests)',
1679               ],
1680               'outputs': [
1681                 '<(_binary).embedded.manifest',
1682               ],
1683               'action': [
1684                 'mt',
1685                 '-nologo',
1686                 '-manifest',
1687                 '<@(_manifests)',
1688                 '-outputresource:<(_binary);#2',
1689                 '-out:<(_binary).embedded.manifest',
1690               ],
1691             },
1692           ],  # actions
1693         },  # end of target 'remoting_host_plugin_manifest'
1695         # Generates the version information resources for the Windows binaries.
1696         # The .RC files are generated from the "version.rc.version" template and
1697         # placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting" folder.
1698         # The substitution strings are taken from:
1699         #   - build/util/LASTCHANGE - the last source code revision.
1700         #   - chrome/VERSION - the major, build & patch versions.
1701         #   - remoting/VERSION - the chromoting patch version (and overrides
1702         #       for chrome/VERSION).
1703         #   - (branding_path) - UI/localizable strings.
1704         #   - xxx.ver - per-binary non-localizable strings such as the binary
1705         #     name.
1706         {
1707           'target_name': 'remoting_version_resources',
1708           'type': 'none',
1709           'inputs': [
1710             '<(branding_path)',
1711             'version.rc.version',
1712             '<(DEPTH)/build/util/LASTCHANGE',
1713             '<(remoting_version_path)',
1714             '<(chrome_version_path)',
1715           ],
1716           'direct_dependent_settings': {
1717             'include_dirs': [
1718               '<(SHARED_INTERMEDIATE_DIR)/remoting',
1719             ],
1720           },
1721           'sources': [
1722             'host/plugin/remoting_host_plugin.ver',
1723             'host/win/remoting_core.ver',
1724             'host/win/remoting_desktop.ver',
1725             'host/win/remoting_host.ver',
1726           ],
1727           'rules': [
1728             {
1729               'rule_name': 'version',
1730               'extension': 'ver',
1731               'variables': {
1732                 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
1733                 'template_input_path': 'version.rc.version',
1734               },
1735               'inputs': [
1736                 '<(branding_path)',
1737                 '<(chrome_version_path)',
1738                 '<(lastchange_path)',
1739                 '<(remoting_version_path)',
1740                 '<(template_input_path)',
1741               ],
1742               'outputs': [
1743                 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)_version.rc',
1744               ],
1745               'action': [
1746                 'python',
1747                 '<(version_py_path)',
1748                 '-f', '<(RULE_INPUT_PATH)',
1749                 '-f', '<(chrome_version_path)',
1750                 # |remoting_version_path| must be after |chrome_version_path|
1751                 # because it can contain overrides for the version numbers.
1752                 '-f', '<(remoting_version_path)',
1753                 '-f', '<(branding_path)',
1754                 '-f', '<(lastchange_path)',
1755                 '<(template_input_path)',
1756                 '<@(_outputs)',
1757               ],
1758               'message': 'Generating version information in <@(_outputs)'
1759             },
1760           ],
1761         },  # end of target 'remoting_version_resources'
1762       ],  # end of 'targets'
1763     }],  # 'OS=="win"'
1765     # The host installation is generated only if WiX is available. If
1766     # component build is used the produced installation will not work due to
1767     # missing DLLs. We build it anyway to make sure the GYP scripts are executed
1768     # by the bots.
1769     ['OS == "win" and wix_exists == "True" and sas_dll_exists == "True"', {
1770       'targets': [
1771         {
1772           'target_name': 'remoting_host_installation',
1773           'type': 'none',
1774           'dependencies': [
1775             'remoting_me2me_host_archive',
1776           ],
1777           'sources': [
1778             '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1779           ],
1780           'outputs': [
1781             '<(PRODUCT_DIR)/chromoting.msi',
1782           ],
1783           'rules': [
1784             {
1785               'rule_name': 'zip2msi',
1786               'extension': 'zip',
1787               'inputs': [
1788                 'tools/zip2msi.py',
1789               ],
1790               'outputs': [
1791                 '<(PRODUCT_DIR)/chromoting.msi',
1792               ],
1793               'msvs_cygwin_shell': 0,
1794               'action': [
1795                 'python', 'tools/zip2msi.py',
1796                 '--wix_path', '<(wix_path)',
1797                 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
1798                 '<(RULE_INPUT_PATH)',
1799                 '<@(_outputs)',
1800               ],
1801               'message': 'Generating <@(_outputs)',
1802             },
1803           ],
1804         },  # end of target 'remoting_host_installation'
1806         {
1807           'target_name': 'remoting_me2me_host_archive',
1808           'type': 'none',
1809           'dependencies': [
1810             'remoting_core_manifest',
1811             'remoting_desktop_manifest',
1812             'remoting_host_manifest',
1813           ],
1814           'compiled_inputs': [
1815             '<(PRODUCT_DIR)/remoting_core.dll',
1816             '<(PRODUCT_DIR)/remoting_desktop.exe',
1817             '<(PRODUCT_DIR)/remoting_host.exe',
1818           ],
1819           'compiled_inputs_dst': [
1820             'files/remoting_core.dll',
1821             'files/remoting_desktop.exe',
1822             'files/remoting_host.exe',
1823           ],
1824           'conditions': [
1825             ['buildtype == "Official"', {
1826               'defs': [
1827                 'OFFICIAL_BUILD=1',
1828               ],
1829             }, {  # else buildtype != "Official"
1830               'defs': [
1831                 'OFFICIAL_BUILD=0',
1832               ],
1833             }],
1834           ],
1835           'defs': [
1836             'BRANDING=<(branding)',
1837             'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
1838             'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
1839             'VERSION=<(version_full)',
1840           ],
1841           'generated_files': [
1842             '<@(_compiled_inputs)',
1843             '<(sas_dll_path)/sas.dll',
1844             'resources/chromoting.ico',
1845           ],
1846           'generated_files_dst': [
1847             '<@(_compiled_inputs_dst)',
1848             'files/sas.dll',
1849             'files/chromoting.ico',
1850           ],
1851           'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1852           'outputs': [
1853             '<(_zip_path)',
1854           ],
1855           'actions': [
1856             {
1857               'action_name': 'Zip installer files for signing',
1858               'temp_dir': '<(INTERMEDIATE_DIR)/installation',
1859               'source_files': [
1860                 '<@(remoting_host_installer_win_files)',
1861               ],
1862               'inputs': [
1863                 '<@(_compiled_inputs)',
1864                 '<(sas_dll_path)/sas.dll',
1865                 '<@(_source_files)',
1866                 'host/installer/build-installer-archive.py',
1867                 'resources/chromoting.ico',
1868               ],
1869               'outputs': [
1870                 '<(_zip_path)',
1871               ],
1872               'action': [
1873                 'python',
1874                 'host/installer/build-installer-archive.py',
1875                 '<(_temp_dir)',
1876                 '<(_zip_path)',
1877                 '--source-file-roots',
1878                 '<@(remoting_host_installer_win_roots)',
1879                 '--source-files',
1880                 '<@(_source_files)',
1881                 '--generated-files',
1882                 '<@(_generated_files)',
1883                 '--generated-files-dst',
1884                 '<@(_generated_files_dst)',
1885                 '--defs',
1886                 '<@(_defs)',
1887               ],
1888             },
1889           ],  # actions
1890         }, # end of target 'remoting_me2me_host_archive'
1891       ],  # end of 'targets'
1892     }],  # '<(wix_path) != ""'
1894   ],  # end of 'conditions'
1896   'targets': [
1897     {
1898       'target_name': 'remoting_breakpad',
1899       'type': 'static_library',
1900       'variables': { 'enable_wexit_time_destructors': 1, },
1901       'dependencies': [
1902         '../base/base.gyp:base',
1903       ],
1904       'sources': [
1905         'base/breakpad.h',
1906         'base/breakpad_linux.cc',
1907         'base/breakpad_mac.mm',
1908         'base/breakpad_win.cc',
1909       ],
1910       'conditions': [
1911         ['OS=="mac"', {
1912           'dependencies': [
1913             '../breakpad/breakpad.gyp:breakpad',
1914           ],
1915         }],
1916         ['OS=="win"', {
1917           'dependencies': [
1918             '../breakpad/breakpad.gyp:breakpad_handler',
1919           ],
1920         }],
1921       ],
1922     },  # end of target 'remoting_breakpad'
1924     {
1925       'target_name': 'remoting_client_plugin',
1926       'type': 'static_library',
1927       'variables': { 'enable_wexit_time_destructors': 1, },
1928       'defines': [
1929         'HAVE_STDINT_H',  # Required by on2_integer.h
1930       ],
1931       'dependencies': [
1932         'remoting_base',
1933         'remoting_client',
1934         'remoting_jingle_glue',
1935         '../net/net.gyp:net',
1936         '../ppapi/ppapi.gyp:ppapi_cpp_objects',
1937         '../skia/skia.gyp:skia',
1938         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
1939       ],
1940       'sources': [
1941         'client/plugin/chromoting_instance.cc',
1942         'client/plugin/chromoting_instance.h',
1943         'client/plugin/mac_key_event_processor.cc',
1944         'client/plugin/mac_key_event_processor.h',
1945         'client/plugin/pepper_audio_player.cc',
1946         'client/plugin/pepper_audio_player.h',
1947         'client/plugin/pepper_entrypoints.cc',
1948         'client/plugin/pepper_entrypoints.h',
1949         'client/plugin/pepper_input_handler.cc',
1950         'client/plugin/pepper_input_handler.h',
1951         'client/plugin/pepper_network_manager.cc',
1952         'client/plugin/pepper_network_manager.h',
1953         'client/plugin/pepper_packet_socket_factory.cc',
1954         'client/plugin/pepper_packet_socket_factory.h',
1955         'client/plugin/pepper_plugin_thread_delegate.cc',
1956         'client/plugin/pepper_plugin_thread_delegate.h',
1957         'client/plugin/pepper_port_allocator.cc',
1958         'client/plugin/pepper_port_allocator.h',
1959         'client/plugin/pepper_token_fetcher.cc',
1960         'client/plugin/pepper_token_fetcher.h',
1961         'client/plugin/pepper_view.cc',
1962         'client/plugin/pepper_view.h',
1963         'client/plugin/pepper_util.cc',
1964         'client/plugin/pepper_util.h',
1965         'client/plugin/pepper_signal_strategy.cc',
1966         'client/plugin/pepper_signal_strategy.h',
1967       ],
1968     },  # end of target 'remoting_client_plugin'
1970     {
1971       'target_name': 'remoting_host_event_logger',
1972       'type': 'static_library',
1973       'variables': { 'enable_wexit_time_destructors': 1, },
1974       'dependencies': [
1975         'remoting_base',
1976       ],
1977       'sources': [
1978         'host/host_event_logger.h',
1979         'host/host_event_logger_posix.cc',
1980         'host/host_event_logger_win.cc',
1981       ],
1982       'conditions': [
1983         ['OS=="win"', {
1984           'sources': [
1985             'host/remoting_host_messages.mc',
1986           ],
1987           'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
1988           'include_dirs': [
1989             '<(_output_dir)',
1990           ],
1991           'direct_dependent_settings': {
1992             'include_dirs': [
1993               '<(_output_dir)',
1994             ],
1995           },
1996           # Rule to run the message compiler.
1997           'rules': [
1998             {
1999               'rule_name': 'message_compiler',
2000               'extension': 'mc',
2001               'inputs': [ ],
2002               'outputs': [
2003                 '<(_output_dir)/remoting_host_messages.h',
2004                 '<(_output_dir)/remoting_host_messages.rc',
2005               ],
2006               'msvs_cygwin_shell': 0,
2007               'action': [
2008                 'mc.exe',
2009                 '-h', '<(_output_dir)',
2010                 '-r', '<(_output_dir)/.',
2011                 '<(RULE_INPUT_PATH)',
2012               ],
2013               'process_outputs_as_sources': 1,
2014               'message': 'Running message compiler on <(RULE_INPUT_PATH).',
2015             },
2016           ],
2017         }],
2018       ],  # end of 'conditions'
2019     },  # end of target 'remoting_host_event_logger'
2021     {
2022       'target_name': 'remoting_webapp',
2023       'type': 'none',
2024       'variables': {
2025         'remoting_webapp_patch_files': [
2026           'webapp/appsv2.patch',
2027         ],
2028         'remoting_webapp_apps_v2_js_files': [
2029           'webapp/background.js',
2030           'webapp/identity.js',
2031         ],
2032       },
2033       'dependencies': [
2034         'remoting_resources',
2035         'remoting_host_plugin',
2036       ],
2037       'sources': [
2038         'webapp/build-webapp.py',
2039         '<(remoting_version_path)',
2040         '<(chrome_version_path)',
2041         '<@(remoting_webapp_apps_v2_js_files)',
2042         '<@(remoting_webapp_files)',
2043         '<@(remoting_webapp_js_files)',
2044         '<@(remoting_webapp_locale_files)',
2045         '<@(remoting_webapp_patch_files)',
2046       ],
2047       'conditions': [
2048         ['enable_remoting_host==1', {
2049           'variables': {
2050               'plugin_path': '<(PRODUCT_DIR)/<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
2051           },
2052         }, {
2053           'variables': {
2054               'plugin_path': '',
2055           },
2056           'dependencies!': [
2057             'remoting_host_plugin',
2058           ],
2059         }],
2060         ['OS=="win"', {
2061           'dependencies': [
2062             'remoting_host_plugin_manifest',
2063           ],
2064         }],
2065       ],
2066       'actions': [
2067         {
2068           'action_name': 'Build Remoting WebApp',
2069           'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
2070           'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
2071           'inputs': [
2072             'webapp/build-webapp.py',
2073             '<(chrome_version_path)',
2074             '<(remoting_version_path)',
2075             '<@(remoting_webapp_files)',
2076             '<@(remoting_webapp_js_files)',
2077             '<@(remoting_webapp_locale_files)',
2078           ],
2079           'conditions': [
2080             ['enable_remoting_host==1', {
2081               'inputs': [
2082                 '<(plugin_path)',
2083               ],
2084             }],
2085           ],
2086           'outputs': [
2087             '<(_output_dir)',
2088             '<(_zip_path)',
2089           ],
2090           'action': [
2091             'python', 'webapp/build-webapp.py',
2092             '<(buildtype)',
2093             '<(version_full)',
2094             '<(host_plugin_mime_type)',
2095             '<(_output_dir)',
2096             '<(_zip_path)',
2097             '<(plugin_path)',
2098             '<@(remoting_webapp_files)',
2099             '<@(remoting_webapp_js_files)',
2100             '--locales',
2101             '<@(remoting_webapp_locale_files)',
2102           ],
2103           'msvs_cygwin_shell': 1,
2104         },
2105       ],
2106       'target_conditions': [
2107         # We cannot currently build the appsv2 version of WebApp on Windows as
2108         # there isn't a version of the "patch" tool available on windows. We
2109         # should remove this condition when we remove the reliance on the 'patch'.
2111         # We define this in a 'target_conditions' section because 'plugin_path'
2112         # is defined in a 'conditions' section so its value is not available
2113         # when gyp processes the 'actions' in a 'conditions" section.
2114         ['OS != "win"', {
2115           'actions': [
2116             {
2117               'action_name': 'Build Remoting WebApp V2',
2118               'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.v2',
2119               'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2.zip',
2120               'inputs': [
2121                 'webapp/build-webapp.py',
2122                 '<(chrome_version_path)',
2123                 '<(remoting_version_path)',
2124                 '<@(remoting_webapp_apps_v2_js_files)',
2125                 '<@(remoting_webapp_files)',
2126                 '<@(remoting_webapp_js_files)',
2127                 '<@(remoting_webapp_locale_files)',
2128                 '<@(remoting_webapp_patch_files)',
2129               ],
2130               'conditions': [
2131                 ['enable_remoting_host==1', {
2132                   'inputs': [
2133                     '<(plugin_path)',
2134                   ],
2135                 }],
2136               ],
2137               'outputs': [
2138                 '<(_output_dir)',
2139                 '<(_zip_path)',
2140               ],
2141               'action': [
2142                 'python', 'webapp/build-webapp.py',
2143                 '<(buildtype)',
2144                 '<(version_full)',
2145                 '<(host_plugin_mime_type)',
2146                 '<(_output_dir)',
2147                 '<(_zip_path)',
2148                 '<(plugin_path)',
2149                 '<@(remoting_webapp_apps_v2_js_files)',
2150                 '<@(remoting_webapp_files)',
2151                 '<@(remoting_webapp_js_files)',
2152                 '--locales',
2153                 '<@(remoting_webapp_locale_files)',
2154                 '--patches',
2155                 '<@(remoting_webapp_patch_files)',
2156               ],
2157               'msvs_cygwin_shell': 1,
2158             },
2159           ],
2160         }],
2161       ],
2162     }, # end of target 'remoting_webapp'
2164     {
2165       'target_name': 'remoting_resources',
2166       'type': 'none',
2167       'variables': {
2168         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
2169         'grit_resource_ids': 'resources/resource_ids',
2170         'sources': [
2171           'base/resources_unittest.cc',
2172           'host/plugin/host_script_object.cc',
2173           'webapp/butter_bar.js',
2174           'webapp/client_screen.js',
2175           'webapp/error.js',
2176           'webapp/host_list.js',
2177           'webapp/host_table_entry.js',
2178           'webapp/host_setup_dialog.js',
2179           'webapp/main.html',
2180           'webapp/manifest.json',
2181           'webapp/remoting.js',
2182         ],
2183       },
2184       'actions': [
2185         {
2186           'action_name': 'verify_resources',
2187           'inputs': [
2188             'resources/remoting_strings.grd',
2189             'resources/common_resources.grd',
2190             'tools/verify_resources.py',
2191             '<@(sources)'
2192           ],
2193           'outputs': [
2194             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
2195           ],
2196           'action': [
2197             'python',
2198             'tools/verify_resources.py',
2199             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
2200             '-r', 'resources/remoting_strings.grd',
2201             '-r', 'resources/common_resources.grd',
2202             '<@(sources)',
2203          ],
2204         },
2205         {
2206           'action_name': 'remoting_strings',
2207           'variables': {
2208             'grit_grd_file': 'resources/remoting_strings.grd',
2209           },
2210           'includes': [ '../build/grit_action.gypi' ],
2211         },
2212         {
2213           'action_name': 'common_resources',
2214           'variables': {
2215             'grit_grd_file': 'resources/common_resources.grd',
2216           },
2217           'includes': [ '../build/grit_action.gypi' ],
2218         },
2219       ],
2220       'copies': [
2221         # Copy results to the product directory.
2222         {
2223           'destination': '<(PRODUCT_DIR)/remoting_locales',
2224           'files': [
2225             '<(grit_out_dir)/remoting/resources/ar.pak',
2226             '<(grit_out_dir)/remoting/resources/bg.pak',
2227             '<(grit_out_dir)/remoting/resources/ca.pak',
2228             '<(grit_out_dir)/remoting/resources/cs.pak',
2229             '<(grit_out_dir)/remoting/resources/da.pak',
2230             '<(grit_out_dir)/remoting/resources/de.pak',
2231             '<(grit_out_dir)/remoting/resources/el.pak',
2232             '<(grit_out_dir)/remoting/resources/en-US.pak',
2233             '<(grit_out_dir)/remoting/resources/en-GB.pak',
2234             '<(grit_out_dir)/remoting/resources/es.pak',
2235             '<(grit_out_dir)/remoting/resources/es-419.pak',
2236             '<(grit_out_dir)/remoting/resources/et.pak',
2237             '<(grit_out_dir)/remoting/resources/fi.pak',
2238             '<(grit_out_dir)/remoting/resources/fil.pak',
2239             '<(grit_out_dir)/remoting/resources/fr.pak',
2240             '<(grit_out_dir)/remoting/resources/he.pak',
2241             '<(grit_out_dir)/remoting/resources/hi.pak',
2242             '<(grit_out_dir)/remoting/resources/hr.pak',
2243             '<(grit_out_dir)/remoting/resources/hu.pak',
2244             '<(grit_out_dir)/remoting/resources/id.pak',
2245             '<(grit_out_dir)/remoting/resources/it.pak',
2246             '<(grit_out_dir)/remoting/resources/ja.pak',
2247             '<(grit_out_dir)/remoting/resources/ko.pak',
2248             '<(grit_out_dir)/remoting/resources/lt.pak',
2249             '<(grit_out_dir)/remoting/resources/lv.pak',
2250             '<(grit_out_dir)/remoting/resources/nb.pak',
2251             '<(grit_out_dir)/remoting/resources/nl.pak',
2252             '<(grit_out_dir)/remoting/resources/pl.pak',
2253             '<(grit_out_dir)/remoting/resources/pt-BR.pak',
2254             '<(grit_out_dir)/remoting/resources/pt-PT.pak',
2255             '<(grit_out_dir)/remoting/resources/ro.pak',
2256             '<(grit_out_dir)/remoting/resources/ru.pak',
2257             '<(grit_out_dir)/remoting/resources/sk.pak',
2258             '<(grit_out_dir)/remoting/resources/sl.pak',
2259             '<(grit_out_dir)/remoting/resources/sr.pak',
2260             '<(grit_out_dir)/remoting/resources/sv.pak',
2261             '<(grit_out_dir)/remoting/resources/th.pak',
2262             '<(grit_out_dir)/remoting/resources/tr.pak',
2263             '<(grit_out_dir)/remoting/resources/uk.pak',
2264             '<(grit_out_dir)/remoting/resources/vi.pak',
2265             '<(grit_out_dir)/remoting/resources/zh-CN.pak',
2266             '<(grit_out_dir)/remoting/resources/zh-TW.pak',
2267           ],
2268         },
2269         {
2270           'destination': '<(PRODUCT_DIR)',
2271           'files': [
2272             '<(grit_out_dir)/remoting/resources/chrome_remote_desktop.pak',
2273           ]
2274         },
2275       ],
2276       'includes': [ '../build/grit_target.gypi' ],
2277     },  # end of target 'remoting_resources'
2279     {
2280       'target_name': 'remoting_base',
2281       'type': 'static_library',
2282       'variables': { 'enable_wexit_time_destructors': 1, },
2283       'dependencies': [
2284         '../base/base.gyp:base',
2285         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
2286         '../ui/ui.gyp:ui',
2287         '../net/net.gyp:net',
2288         '../skia/skia.gyp:skia',
2289         '../third_party/libvpx/libvpx.gyp:libvpx',
2290         '../third_party/libyuv/libyuv.gyp:libyuv',
2291         '../third_party/opus/opus.gyp:opus',
2292         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
2293         '../third_party/speex/speex.gyp:libspeex',
2294         '../media/media.gyp:media',
2295         '../media/media.gyp:shared_memory_support',
2296         'remoting_jingle_glue',
2297         'remoting_resources',
2298         'proto/chromotocol.gyp:chromotocol_proto_lib',
2299         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
2300       ],
2301       'export_dependent_settings': [
2302         '../base/base.gyp:base',
2303         '../net/net.gyp:net',
2304         '../skia/skia.gyp:skia',
2305         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
2306         'proto/chromotocol.gyp:chromotocol_proto_lib',
2307       ],
2308       # This target needs a hard dependency because dependent targets
2309       # depend on chromotocol_proto_lib for headers.
2310       'hard_dependency': 1,
2311       'sources': [
2312         'base/auth_token_util.cc',
2313         'base/auth_token_util.h',
2314         'base/auto_thread.cc',
2315         'base/auto_thread.h',
2316         'base/auto_thread_task_runner.cc',
2317         'base/auto_thread_task_runner.h',
2318         'base/capabilities.cc',
2319         'base/capabilities.h',
2320         'base/compound_buffer.cc',
2321         'base/compound_buffer.h',
2322         'base/constants.cc',
2323         'base/constants.h',
2324         'base/plugin_thread_task_runner.cc',
2325         'base/plugin_thread_task_runner.h',
2326         'base/rate_counter.cc',
2327         'base/rate_counter.h',
2328         'base/resources.cc',
2329         'base/resources.h',
2330         'base/rsa_key_pair.cc',
2331         'base/rsa_key_pair.h',
2332         'base/running_average.cc',
2333         'base/running_average.h',
2334         'base/socket_reader.cc',
2335         'base/socket_reader.h',
2336         'base/typed_buffer.h',
2337         'base/util.cc',
2338         'base/util.h',
2339         'codec/audio_decoder.cc',
2340         'codec/audio_decoder.h',
2341         'codec/audio_decoder_opus.cc',
2342         'codec/audio_decoder_opus.h',
2343         'codec/audio_decoder_speex.cc',
2344         'codec/audio_decoder_speex.h',
2345         'codec/audio_decoder_verbatim.cc',
2346         'codec/audio_decoder_verbatim.h',
2347         'codec/audio_encoder.h',
2348         'codec/audio_encoder_opus.cc',
2349         'codec/audio_encoder_opus.h',
2350         'codec/audio_encoder_speex.cc',
2351         'codec/audio_encoder_speex.h',
2352         'codec/audio_encoder_verbatim.cc',
2353         'codec/audio_encoder_verbatim.h',
2354         'codec/video_decoder.h',
2355         'codec/video_decoder_verbatim.cc',
2356         'codec/video_decoder_verbatim.h',
2357         'codec/video_decoder_vp8.cc',
2358         'codec/video_decoder_vp8.h',
2359         'codec/video_encoder.h',
2360         'codec/video_encoder_verbatim.cc',
2361         'codec/video_encoder_verbatim.h',
2362         'codec/video_encoder_vp8.cc',
2363         'codec/video_encoder_vp8.h',
2364       ],
2365     },  # end of target 'remoting_base'
2367     {
2368       'target_name': 'remoting_host_logging',
2369       'type': 'static_library',
2370       'variables': { 'enable_wexit_time_destructors': 1, },
2371       'dependencies': [
2372         '../base/base.gyp:base',
2373       ],
2374       'sources': [
2375         'host/branding.cc',
2376         'host/branding.h',
2377         'host/logging.h',
2378         'host/logging_posix.cc',
2379         'host/logging_win.cc',
2380       ],
2381     },  # end of target 'remoting_host_logging'
2383     {
2384       'target_name': 'remoting_client',
2385       'type': 'static_library',
2386       'variables': { 'enable_wexit_time_destructors': 1, },
2387       'dependencies': [
2388         'remoting_base',
2389         'remoting_jingle_glue',
2390         'remoting_protocol',
2391       ],
2392       'sources': [
2393         'client/audio_decode_scheduler.cc',
2394         'client/audio_decode_scheduler.h',
2395         'client/audio_player.cc',
2396         'client/audio_player.h',
2397         'client/chromoting_client.cc',
2398         'client/chromoting_client.h',
2399         'client/chromoting_stats.cc',
2400         'client/chromoting_stats.h',
2401         'client/client_config.cc',
2402         'client/client_config.h',
2403         'client/client_context.cc',
2404         'client/client_context.h',
2405         'client/client_user_interface.h',
2406         'client/frame_consumer.h',
2407         'client/frame_consumer_proxy.cc',
2408         'client/frame_consumer_proxy.h',
2409         'client/frame_producer.h',
2410         'client/key_event_mapper.cc',
2411         'client/key_event_mapper.h',
2412         'client/rectangle_update_decoder.cc',
2413         'client/rectangle_update_decoder.h',
2414       ],
2415     },  # end of target 'remoting_client'
2417     {
2418       'target_name': 'remoting_jingle_glue',
2419       'type': 'static_library',
2420       'variables': { 'enable_wexit_time_destructors': 1, },
2421       'dependencies': [
2422         '../base/base.gyp:base',
2423         '../jingle/jingle.gyp:jingle_glue',
2424         '../jingle/jingle.gyp:notifier',
2425         '../third_party/libjingle/libjingle.gyp:libjingle',
2426       ],
2427       'export_dependent_settings': [
2428         '../third_party/libjingle/libjingle.gyp:libjingle',
2429       ],
2430       'sources': [
2431         'jingle_glue/chromium_port_allocator.cc',
2432         'jingle_glue/chromium_port_allocator.h',
2433         'jingle_glue/chromium_socket_factory.cc',
2434         'jingle_glue/chromium_socket_factory.h',
2435         'jingle_glue/iq_sender.cc',
2436         'jingle_glue/iq_sender.h',
2437         'jingle_glue/jingle_info_request.cc',
2438         'jingle_glue/jingle_info_request.h',
2439         'jingle_glue/network_settings.h',
2440         'jingle_glue/signal_strategy.h',
2441         'jingle_glue/xmpp_signal_strategy.cc',
2442         'jingle_glue/xmpp_signal_strategy.h',
2443       ],
2444     },  # end of target 'remoting_jingle_glue'
2446     {
2447       'target_name': 'remoting_protocol',
2448       'type': 'static_library',
2449       'variables': { 'enable_wexit_time_destructors': 1, },
2450       'dependencies': [
2451         'remoting_base',
2452         'remoting_jingle_glue',
2453         '../crypto/crypto.gyp:crypto',
2454         '../jingle/jingle.gyp:jingle_glue',
2455         '../net/net.gyp:net',
2456       ],
2457       'export_dependent_settings': [
2458         'remoting_jingle_glue',
2459       ],
2460       'sources': [
2461         'protocol/audio_reader.cc',
2462         'protocol/audio_reader.h',
2463         'protocol/audio_stub.h',
2464         'protocol/audio_writer.cc',
2465         'protocol/audio_writer.h',
2466         'protocol/auth_util.cc',
2467         'protocol/auth_util.h',
2468         'protocol/authentication_method.cc',
2469         'protocol/authentication_method.h',
2470         'protocol/authenticator.cc',
2471         'protocol/authenticator.h',
2472         'protocol/buffered_socket_writer.cc',
2473         'protocol/buffered_socket_writer.h',
2474         'protocol/channel_authenticator.h',
2475         'protocol/channel_dispatcher_base.cc',
2476         'protocol/channel_dispatcher_base.h',
2477         'protocol/channel_multiplexer.cc',
2478         'protocol/channel_multiplexer.h',
2479         'protocol/client_control_dispatcher.cc',
2480         'protocol/client_control_dispatcher.h',
2481         'protocol/client_event_dispatcher.cc',
2482         'protocol/client_event_dispatcher.h',
2483         'protocol/client_stub.h',
2484         'protocol/clipboard_echo_filter.cc',
2485         'protocol/clipboard_echo_filter.h',
2486         'protocol/clipboard_filter.cc',
2487         'protocol/clipboard_filter.h',
2488         'protocol/clipboard_stub.h',
2489         'protocol/clipboard_thread_proxy.cc',
2490         'protocol/clipboard_thread_proxy.h',
2491         'protocol/connection_to_client.cc',
2492         'protocol/connection_to_client.h',
2493         'protocol/connection_to_host.cc',
2494         'protocol/connection_to_host.h',
2495         'protocol/content_description.cc',
2496         'protocol/content_description.h',
2497         'protocol/errors.h',
2498         'protocol/host_control_dispatcher.cc',
2499         'protocol/host_control_dispatcher.h',
2500         'protocol/host_event_dispatcher.cc',
2501         'protocol/host_event_dispatcher.h',
2502         'protocol/host_stub.h',
2503         'protocol/input_event_tracker.cc',
2504         'protocol/input_event_tracker.h',
2505         'protocol/input_filter.cc',
2506         'protocol/input_filter.h',
2507         'protocol/input_stub.h',
2508         'protocol/it2me_host_authenticator_factory.cc',
2509         'protocol/it2me_host_authenticator_factory.h',
2510         'protocol/jingle_messages.cc',
2511         'protocol/jingle_messages.h',
2512         'protocol/jingle_session.cc',
2513         'protocol/jingle_session.h',
2514         'protocol/jingle_session_manager.cc',
2515         'protocol/jingle_session_manager.h',
2516         'protocol/libjingle_transport_factory.cc',
2517         'protocol/libjingle_transport_factory.h',
2518         'protocol/me2me_host_authenticator_factory.cc',
2519         'protocol/me2me_host_authenticator_factory.h',
2520         'protocol/message_decoder.cc',
2521         'protocol/message_decoder.h',
2522         'protocol/message_reader.cc',
2523         'protocol/message_reader.h',
2524         'protocol/mouse_input_filter.cc',
2525         'protocol/mouse_input_filter.h',
2526         'protocol/name_value_map.h',
2527         'protocol/negotiating_authenticator_base.cc',
2528         'protocol/negotiating_authenticator_base.h',
2529         'protocol/negotiating_client_authenticator.cc',
2530         'protocol/negotiating_client_authenticator.h',
2531         'protocol/negotiating_host_authenticator.cc',
2532         'protocol/negotiating_host_authenticator.h',
2533         'protocol/pairing_authenticator_base.cc',
2534         'protocol/pairing_authenticator_base.h',
2535         'protocol/pairing_client_authenticator.cc',
2536         'protocol/pairing_client_authenticator.h',
2537         'protocol/pairing_host_authenticator.cc',
2538         'protocol/pairing_host_authenticator.h',
2539         'protocol/pairing_registry.cc',
2540         'protocol/pairing_registry.h',
2541         'protocol/protobuf_video_reader.cc',
2542         'protocol/protobuf_video_reader.h',
2543         'protocol/protobuf_video_writer.cc',
2544         'protocol/protobuf_video_writer.h',
2545         'protocol/session.h',
2546         'protocol/session_config.cc',
2547         'protocol/session_config.h',
2548         'protocol/session_manager.h',
2549         'protocol/ssl_hmac_channel_authenticator.cc',
2550         'protocol/ssl_hmac_channel_authenticator.h',
2551         'protocol/transport.cc',
2552         'protocol/transport.h',
2553         'protocol/transport_config.cc',
2554         'protocol/transport_config.h',
2555         'protocol/util.cc',
2556         'protocol/util.h',
2557         'protocol/third_party_authenticator_base.cc',
2558         'protocol/third_party_authenticator_base.h',
2559         'protocol/third_party_client_authenticator.cc',
2560         'protocol/third_party_client_authenticator.h',
2561         'protocol/third_party_host_authenticator.cc',
2562         'protocol/third_party_host_authenticator.h',
2563         'protocol/v2_authenticator.cc',
2564         'protocol/v2_authenticator.h',
2565         'protocol/video_reader.cc',
2566         'protocol/video_reader.h',
2567         'protocol/video_stub.h',
2568         'protocol/video_writer.cc',
2569         'protocol/video_writer.h',
2570       ],
2571     },  # end of target 'remoting_protocol'
2573     # Remoting unit tests
2574     {
2575       'target_name': 'remoting_unittests',
2576       'type': 'executable',
2577       'dependencies': [
2578         '../base/base.gyp:base',
2579         '../base/base.gyp:base_i18n',
2580         '../base/base.gyp:test_support_base',
2581         '../ipc/ipc.gyp:ipc',
2582         '../net/net.gyp:net_test_support',
2583         '../ppapi/ppapi.gyp:ppapi_cpp',
2584         '../testing/gmock.gyp:gmock',
2585         '../testing/gtest.gyp:gtest',
2586         '../ui/ui.gyp:ui',
2587         'remoting_base',
2588         'remoting_breakpad',
2589         'remoting_client',
2590         'remoting_client_plugin',
2591         'remoting_host',
2592         'remoting_host_event_logger',
2593         'remoting_host_setup_base',
2594         'remoting_jingle_glue',
2595         'remoting_protocol',
2596         'remoting_resources',
2597         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
2598       ],
2599       'defines': [
2600         'VERSION=<(version_full)',
2601       ],
2602       'include_dirs': [
2603         '../testing/gmock/include',
2604       ],
2605       'sources': [
2606         '../chrome/test/base/run_all_remoting_unittests.cc',
2607         'base/auth_token_util_unittest.cc',
2608         'base/auto_thread_task_runner_unittest.cc',
2609         'base/auto_thread_unittest.cc',
2610         'base/breakpad_win_unittest.cc',
2611         'base/capabilities_unittest.cc',
2612         'base/compound_buffer_unittest.cc',
2613         'base/rate_counter_unittest.cc',
2614         'base/resources_unittest.cc',
2615         'base/rsa_key_pair_unittest.cc',
2616         'base/running_average_unittest.cc',
2617         'base/test_rsa_key_pair.h',
2618         'base/typed_buffer_unittest.cc',
2619         'base/util_unittest.cc',
2620         'client/audio_player_unittest.cc',
2621         'client/key_event_mapper_unittest.cc',
2622         'client/plugin/mac_key_event_processor_unittest.cc',
2623         'codec/audio_encoder_opus_unittest.cc',
2624         'codec/codec_test.cc',
2625         'codec/codec_test.h',
2626         'codec/video_decoder_vp8_unittest.cc',
2627         'codec/video_encoder_verbatim_unittest.cc',
2628         'codec/video_encoder_vp8_unittest.cc',
2629         'host/audio_silence_detector_unittest.cc',
2630         'host/branding.cc',
2631         'host/branding.h',
2632         'host/capture_scheduler_unittest.cc',
2633         'host/chromoting_host_context_unittest.cc',
2634         'host/chromoting_host_unittest.cc',
2635         'host/client_session_unittest.cc',
2636         'host/config_file_watcher_unittest.cc',
2637         'host/daemon_process.cc',
2638         'host/daemon_process.h',
2639         'host/daemon_process_unittest.cc',
2640         'host/desktop_process.cc',
2641         'host/desktop_process.h',
2642         'host/desktop_process_unittest.cc',
2643         'host/desktop_session.cc',
2644         'host/desktop_session.h',
2645         'host/desktop_session_agent.cc',
2646         'host/desktop_session_agent.h',
2647         'host/heartbeat_sender_unittest.cc',
2648         'host/host_change_notification_listener_unittest.cc',
2649         'host/host_mock_objects.cc',
2650         'host/host_mock_objects.h',
2651         'host/host_status_monitor_fake.h',
2652         'host/ipc_desktop_environment_unittest.cc',
2653         'host/json_host_config_unittest.cc',
2654         'host/linux/x_server_clipboard_unittest.cc',
2655         'host/local_input_monitor_unittest.cc',
2656         'host/log_to_server_unittest.cc',
2657         'host/pairing_registry_delegate_linux_unittest.cc',
2658         'host/pin_hash_unittest.cc',
2659         'host/policy_hack/fake_policy_watcher.cc',
2660         'host/policy_hack/fake_policy_watcher.h',
2661         'host/policy_hack/mock_policy_callback.cc',
2662         'host/policy_hack/mock_policy_callback.h',
2663         'host/policy_hack/policy_watcher_unittest.cc',
2664         'host/register_support_host_request_unittest.cc',
2665         'host/remote_input_filter_unittest.cc',
2666         'host/resizing_host_observer_unittest.cc',
2667         'host/screen_capturer_fake.cc',
2668         'host/screen_capturer_fake.h',
2669         'host/screen_resolution_unittest.cc',
2670         'host/server_log_entry_unittest.cc',
2671         'host/setup/native_messaging_host_unittest.cc',
2672         'host/setup/native_messaging_reader_unittest.cc',
2673         'host/setup/native_messaging_writer_unittest.cc',
2674         'host/setup/oauth_helper_unittest.cc',
2675         'host/setup/pin_validator_unittest.cc',
2676         'host/token_validator_factory_impl_unittest.cc',
2677         'host/video_scheduler_unittest.cc',
2678         'host/win/rdp_client_unittest.cc',
2679         'host/win/worker_process_launcher.cc',
2680         'host/win/worker_process_launcher.h',
2681         'host/win/worker_process_launcher_unittest.cc',
2682         'jingle_glue/chromium_socket_factory_unittest.cc',
2683         'jingle_glue/fake_signal_strategy.cc',
2684         'jingle_glue/fake_signal_strategy.h',
2685         'jingle_glue/iq_sender_unittest.cc',
2686         'jingle_glue/mock_objects.cc',
2687         'jingle_glue/mock_objects.h',
2688         'protocol/authenticator_test_base.cc',
2689         'protocol/authenticator_test_base.h',
2690         'protocol/buffered_socket_writer_unittest.cc',
2691         'protocol/channel_multiplexer_unittest.cc',
2692         'protocol/clipboard_echo_filter_unittest.cc',
2693         'protocol/clipboard_filter_unittest.cc',
2694         'protocol/connection_tester.cc',
2695         'protocol/connection_tester.h',
2696         'protocol/connection_to_client_unittest.cc',
2697         'protocol/content_description_unittest.cc',
2698         'protocol/fake_authenticator.cc',
2699         'protocol/fake_authenticator.h',
2700         'protocol/fake_session.cc',
2701         'protocol/fake_session.h',
2702         'protocol/input_event_tracker_unittest.cc',
2703         'protocol/input_filter_unittest.cc',
2704         'protocol/jingle_messages_unittest.cc',
2705         'protocol/jingle_session_unittest.cc',
2706         'protocol/message_decoder_unittest.cc',
2707         'protocol/message_reader_unittest.cc',
2708         'protocol/mouse_input_filter_unittest.cc',
2709         'protocol/negotiating_authenticator_unittest.cc',
2710         'protocol/pairing_registry_unittest.cc',
2711         'protocol/ppapi_module_stub.cc',
2712         'protocol/protocol_mock_objects.cc',
2713         'protocol/protocol_mock_objects.h',
2714         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
2715         'protocol/third_party_authenticator_unittest.cc',
2716         'protocol/v2_authenticator_unittest.cc',
2717       ],
2718       'conditions': [
2719         [ 'OS=="win"', {
2720           'defines': [
2721             '_ATL_NO_EXCEPTIONS',
2722           ],
2723           'include_dirs': [
2724             '../breakpad/src',
2725           ],
2726           'link_settings': {
2727             'libraries': [
2728               '-lrpcrt4.lib',
2729               '-lwtsapi32.lib',
2730             ],
2731           },
2732         }],
2733         ['OS=="mac" or (OS=="linux" and chromeos==0)', {
2734           # Javascript unittests are disabled on CrOS because they cause
2735           # valgrind and test errors.
2736           #
2737           # Javascript unittests are disabled on Windows because they add a
2738           # dependency on 'common_constants' which (only on Windows) requires
2739           # additional dependencies:
2740           #   '../content/content.gyp:content_common',
2741           #   'installer_util',
2742           # These targets are defined in .gypi files that would need to be
2743           # included here:
2744           #   '../chrome/chrome_common.gypi',
2745           #   '../chrome/chrome_installer.gypi',
2746           #   '../chrome/chrome_installer_util.gypi',
2747           # But we can't do that because ninja will complain about multiple
2748           # target definitions.
2749           # TODO(garykac): Move installer_util into a proper .gyp file so that
2750           # it can be included in multiple .gyp files.
2751           'includes': [
2752             '../chrome/js_unittest_rules.gypi',
2753           ],
2754           'dependencies': [
2755             '../chrome/common_constants.gyp:common_constants',
2756             '../v8/tools/gyp/v8.gyp:v8',
2757           ],
2758           'sources': [
2759             '../chrome/test/base/v8_unit_test.cc',
2760             '../chrome/test/base/v8_unit_test.h',
2761             'webapp/browser_globals.gtestjs',
2762             'webapp/all_js_load.gtestjs',
2763             'webapp/format_iq.gtestjs',
2764             '<@(remoting_webapp_js_files)',
2765           ],
2766         }],
2767         ['enable_remoting_host == 0', {
2768           'dependencies!': [
2769             'remoting_host',
2770             'remoting_host_setup_base',
2771           ],
2772           'sources/': [
2773             ['exclude', 'codec/*'],
2774             ['exclude', 'host/*'],
2775           ]
2776         }],
2777         ['toolkit_uses_gtk == 1', {
2778           'dependencies': [
2779             # Needed for the following #include chain:
2780             #   base/run_all_unittests.cc
2781             #   ../base/test_suite.h
2782             #   gtk/gtk.h
2783             '../build/linux/system.gyp:gtk',
2784             '../build/linux/system.gyp:ssl',
2785           ],
2786           'conditions': [
2787             [ 'linux_use_tcmalloc==1', {
2788                 'dependencies': [
2789                   '../base/allocator/allocator.gyp:allocator',
2790                 ],
2791               },
2792             ],
2793           ],
2794         }],  # end of 'toolkit_uses_gtk == 1'
2795       ],  # end of 'conditions'
2796     },  # end of target 'remoting_unittests'
2797   ],  # end of targets