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