Commit 1c693998 authored by Brett Wilson's avatar Brett Wilson

Add some remoting targets to GN build.

Since GN runs its scripts in a different current directory than GYP, I had to update the remoting html template script to be able to handle this situation.

Also includes many misc linking fixes:
  - Sets enable_nacl to false.
  - Add renderer context menu component
  - Adds many missing files

R=sergeyu@chromium.org

Review URL: https://codereview.chromium.org/498773005

Cr-Commit-Position: refs/heads/master@{#291731}
parent 8fbaaa3b
......@@ -66,6 +66,7 @@ group("root") {
"//pdf",
"//ppapi:ppapi_c",
"//printing",
"//remoting/client/plugin",
"//sandbox",
"//sdch",
"//skia",
......@@ -227,6 +228,7 @@ group("root") {
# Not tested on Android yet:
"//google_apis/gcm",
"//remoting/client/plugin",
"//third_party/cld_2",
"//third_party/libaddressinput",
"//third_party/ffmpeg",
......
......@@ -22,7 +22,9 @@ declare_args() {
enable_plugins = !is_android || !is_ios
# Enables Native Client support.
enable_nacl = (!is_ios && !is_android)
# TODO(GYP) enable this when nacl works in GN.
enable_nacl = false
#enable_nacl = (!is_ios && !is_android)
# If debug_devtools is set to true, JavaScript files for DevTools are stored
# as is and loaded from disk. Otherwise, a concatenated file is stored in
......
......@@ -42,8 +42,10 @@ static_library("browser") {
"//chrome/common",
"//chrome/common/net",
"//components/autofill/core/browser",
"//components/bookmarks/browser",
"//components/captive_portal",
"//components/cloud_devices/common",
"//components/component_updater",
"//components/content_settings/core/common",
"//components/crx_file",
"//components/data_reduction_proxy/browser",
......@@ -52,20 +54,33 @@ static_library("browser") {
"//components/favicon/core",
"//components/feedback",
"//components/gcm_driver",
"//components/google/core/browser",
"//components/history/core/browser",
"//components/history/core/common",
"//components/infobars/core",
"//components/invalidation",
"//components/metrics:net",
"//components/metrics/proto:proto",
"//components/navigation_metrics",
"//components/network_time",
"//components/omaha_query_params",
"//components/omnibox",
"//components/os_crypt",
"//components/password_manager/core/browser",
"//components/password_manager/core/common",
"//components/policy:policy_component",
"//components/precache/core",
"//components/query_parser",
"//components/rappor",
"//components/renderer_context_menu",
"//components/search",
"//components/search_engines",
"//components/search_provider_logos",
"//components/signin/core/browser",
"//components/startup_metric_utils",
"//components/strings",
"//components/suggestions",
"//components/sync_driver",
"//components/translate/core/browser",
"//components/translate/core/common",
"//components/url_fixer",
......@@ -96,19 +111,6 @@ static_library("browser") {
"//ui/shell_dialogs",
"//ui/strings",
"//ui/resources",
# TODO(GYP)
#"../components/components.gyp:bookmarks_browser",
#"../components/components.gyp:google_core_browser",
#"../components/components.gyp:infobars_core",
#"../components/components.gyp:invalidation",
#"../components/components.gyp:network_time",
#"../components/components.gyp:omaha_query_params",
#"../components/components.gyp:password_manager_core_browser",
#"../components/components.gyp:password_manager_core_common",
#"../components/components.gyp:precache_core",
#"../components/components.gyp:search_engines",
#"../components/components.gyp:search_provider_logos",
#"../components/components.gyp:sync_driver",
]
forward_dependent_configs_from = [
......@@ -137,6 +139,7 @@ static_library("browser") {
configs += [ "//content:webrtc_stub_config" ]
deps += [
"//apps",
"//cc",
"//chrome/browser/devtools",
"//chrome/browser/performance_monitor",
......@@ -180,7 +183,6 @@ static_library("browser") {
"//webkit/browser:storage",
"//webkit/common",
"//webkit/common:storage",
#"apps", TODO(GYP)
## TODO(tonyg): Remove this dependency (crbug.com/280157).
#"../testing/perf/perf_test.gyp:*", TODO(GYP)
# Note: for this one also remove the webrtc_stub_config
......
......@@ -64,6 +64,7 @@ group("all_components") {
"//components/pref_registry",
"//components/query_parser",
"//components/rappor",
"//components/renderer_context_menu",
"//components/resources:components_resources",
"//components/search",
"//components/search_engines",
......@@ -144,6 +145,7 @@ group("all_components") {
"//components/precache/content", # Blocked on content.
"//components/precache/core", # Should work, needs checking.
"//components/rappor", # Should work, needs checking.
"//components/renderer_context_menu", # Blocked on content.
"//components/search_engines", # Should work, needs checking.
"//components/search_provider_logos", # Should work, needs checking.
"//components/sessions", # Blocked on content.
......
......@@ -5,10 +5,12 @@
# GYP version: components/metrics.gypi:metrics
source_set("metrics") {
sources = [
"compression_utils.cc",
"compression_utils.h",
"client_info.cc",
"client_info.h",
"cloned_install_detector.cc",
"cloned_install_detector.h",
"compression_utils.cc",
"compression_utils.h",
"machine_id_provider.h",
"machine_id_provider_stub.cc",
"machine_id_provider_win.cc",
......@@ -16,10 +18,10 @@ source_set("metrics") {
"metrics_hashes.h",
"metrics_log.cc",
"metrics_log.h",
"metrics_log_uploader.cc",
"metrics_log_uploader.h",
"metrics_log_manager.cc",
"metrics_log_manager.h",
"metrics_log_uploader.cc",
"metrics_log_uploader.h",
"metrics_pref_names.cc",
"metrics_pref_names.h",
"metrics_provider.h",
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ui.gni")
static_library("renderer_context_menu") {
sources = [
"context_menu_content_type.cc",
"context_menu_content_type.h",
"context_menu_delegate.cc",
"context_menu_delegate.h",
"render_view_context_menu_base.cc",
"render_view_context_menu_base.h",
"render_view_context_menu_observer.cc",
"render_view_context_menu_observer.h",
"render_view_context_menu_proxy.h",
]
if (toolkit_views) {
sources += [
"views/toolkit_delegate_views.cc",
"views/toolkit_delegate_views.h",
]
}
deps = [
"//base",
"//content/public/browser",
"//components/search_engines",
"//components/metrics/proto",
]
}
......@@ -20,6 +20,8 @@ source_set("browser") {
"translate_event_details.h",
"translate_language_list.cc",
"translate_language_list.h",
"translate_manager.cc",
"translate_manager.h",
"translate_prefs.cc",
"translate_prefs.h",
"translate_script.cc",
......
......@@ -18,6 +18,7 @@
'../third_party/mt19937ar/mt19937ar.gyp:mt19937ar',
],
'sources': [
# Note: sources list duplicated in GN build.
'variations/active_field_trials.cc',
'variations/active_field_trials.h',
'variations/android/component_jni_registrar.cc',
......
......@@ -6,6 +6,10 @@ static_library("variations") {
sources = [
"active_field_trials.cc",
"active_field_trials.h",
"android/component_jni_registrar.cc",
"android/component_jni_registrar.h",
"android/variations_associated_data_android.cc",
"android/variations_associated_data_android.h",
"caching_permuted_entropy_provider.cc",
"caching_permuted_entropy_provider.h",
"entropy_provider.cc",
......@@ -16,10 +20,16 @@ static_library("variations") {
"pref_names.h",
"processed_study.cc",
"processed_study.h",
"proto/client_variations.proto",
"proto/permuted_entropy_cache.proto",
"proto/study.proto",
"proto/variations_seed.proto",
"study_filtering.cc",
"study_filtering.h",
"variations_associated_data.cc",
"variations_associated_data.h",
"variations_http_header_provider.cc",
"variations_http_header_provider.h",
"variations_seed_processor.cc",
"variations_seed_processor.h",
"variations_seed_simulator.cc",
......
......@@ -41,6 +41,7 @@ source_set("browser") {
"api/app_view/app_view_internal_api.h",
"api/async_api_function.cc",
"api/async_api_function.h",
"api/cast_channel/cast_auth_util.cc",
"api/cast_channel/cast_auth_util.h",
"api/cast_channel/cast_channel_api.cc",
"api/cast_channel/cast_channel_api.h",
......@@ -216,6 +217,24 @@ source_set("browser") {
"file_reader.h",
"granted_file_entry.cc",
"granted_file_entry.h",
"guest_view/guest_view_base.cc",
"guest_view/guest_view_base.h",
"guest_view/guest_view_constants.cc",
"guest_view/guest_view_constants.h",
"guest_view/guest_view_manager_factory.h",
"guest_view/guest_view_manager.cc",
"guest_view/guest_view_manager.h",
"guest_view/guest_view.h",
"guest_view/app_view/app_view_constants.cc",
"guest_view/app_view/app_view_constants.h",
"guest_view/app_view/app_view_guest.cc",
"guest_view/app_view/app_view_guest.h",
"guest_view/app_view/app_view_guest_delegate.cc",
"guest_view/app_view/app_view_guest_delegate.h",
"guest_view/web_view/web_view_permission_helper_delegate.cc",
"guest_view/web_view/web_view_permission_helper_delegate.h",
"guest_view/web_view/web_view_guest_delegate.cc",
"guest_view/web_view/web_view_guest_delegate.h",
"image_loader.cc",
"image_loader.h",
"image_loader_factory.cc",
......
......@@ -273,6 +273,7 @@
'<(SHARED_INTERMEDIATE_DIR)/chrome',
],
'sources': [
# Note: sources list duplicated in GN build.
'browser/admin_policy.cc',
'browser/admin_policy.h',
# NOTE: When moving an API out of Chrome be sure to verify that the
......
......@@ -77,6 +77,8 @@ config("key_defines") {
source_set("google_apis") {
sources = [
"gaia/account_tracker.cc",
"gaia/account_tracker.h",
"gaia/gaia_auth_consumer.cc",
"gaia/gaia_auth_consumer.h",
"gaia/gaia_auth_fetcher.cc",
......
......@@ -39,6 +39,7 @@
}],
['enable_extensions==1', {
'sources': [
# Note: sources list duplicated in GN build.
'drive/auth_service.cc',
'drive/auth_service.h',
'drive/auth_service_interface.h',
......@@ -72,6 +73,7 @@
}],
],
'sources': [
# Note: sources list duplicated in GN build.
'gaia/account_tracker.cc',
'gaia/account_tracker.h',
'gaia/gaia_auth_consumer.cc',
......
......@@ -47,6 +47,7 @@
],
'targets': [
{
# GN version: //media
'target_name': 'media',
'type': '<(component)',
'dependencies': [
......@@ -999,6 +1000,7 @@
],
},
{
# GN version: //media:media_unittests
'target_name': 'media_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
......@@ -1287,6 +1289,7 @@
],
},
{
# GN version: //media:media_perftests
'target_name': 'media_perftests',
'type': '<(gtest_target_type)',
'dependencies': [
......@@ -1338,6 +1341,7 @@
],
},
{
# GN version: //media:test_support
'target_name': 'media_test_support',
'type': 'static_library',
'dependencies': [
......@@ -1386,6 +1390,7 @@
# Minimal target for NaCl and other renderer side media clients which
# only need to send audio data across the shared memory to the browser
# process.
# GN version: //media:shared_memory_support
'target_name': 'shared_memory_support',
'type': '<(component)',
'dependencies': [
......@@ -1709,6 +1714,7 @@
['media_use_ffmpeg==1', {
'targets': [
{
# GN version: //media:ffmpeg_unittests
'target_name': 'ffmpeg_unittests',
'type': 'executable',
'dependencies': [
......@@ -1725,6 +1731,7 @@
],
},
{
# GN version: //media:ffmpeg_regression_tests
'target_name': 'ffmpeg_regression_tests',
'type': 'executable',
'dependencies': [
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("base") {
sources = [
"auth_token_util.cc",
"auth_token_util.h",
"auto_thread.cc",
"auto_thread.h",
"auto_thread_task_runner.cc",
"auto_thread_task_runner.h",
"capabilities.cc",
"capabilities.h",
"compound_buffer.cc",
"compound_buffer.h",
"constants.cc",
"constants.h",
"plugin_thread_task_runner.cc",
"plugin_thread_task_runner.h",
"rate_counter.cc",
"rate_counter.h",
"resources.h",
"resources_linux.cc",
"resources_mac.cc",
"resources_win.cc",
"rsa_key_pair.cc",
"rsa_key_pair.h",
"running_average.cc",
"running_average.h",
"scoped_sc_handle_win.h",
"service_urls.cc",
"service_urls.h",
"socket_reader.cc",
"socket_reader.h",
"typed_buffer.h",
"url_request_context_getter.cc",
"url_request_context_getter.h",
"util.cc",
"util.h",
"vlog_net_log.cc",
"vlog_net_log.h",
"../codec/audio_decoder.cc",
"../codec/audio_decoder.h",
"../codec/audio_decoder_opus.cc",
"../codec/audio_decoder_opus.h",
"../codec/audio_decoder_verbatim.cc",
"../codec/audio_decoder_verbatim.h",
"../codec/audio_encoder.h",
"../codec/audio_encoder_opus.cc",
"../codec/audio_encoder_opus.h",
"../codec/audio_encoder_verbatim.cc",
"../codec/audio_encoder_verbatim.h",
"../codec/scoped_vpx_codec.cc",
"../codec/scoped_vpx_codec.h",
"../codec/video_decoder.h",
"../codec/video_decoder_verbatim.cc",
"../codec/video_decoder_verbatim.h",
"../codec/video_decoder_vpx.cc",
"../codec/video_decoder_vpx.h",
"../codec/video_encoder.h",
"../codec/video_encoder_verbatim.cc",
"../codec/video_encoder_verbatim.h",
"../codec/video_encoder_vpx.cc",
"../codec/video_encoder_vpx.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
# TODO(GYP) Remove when WebRTC is converted.
configs += [ "//content:webrtc_stub_config" ]
deps = [
"//base",
"//base/third_party/dynamic_annotations",
"//media",
"//media:shared_memory_support",
"//net",
"//remoting/proto",
"//remoting/resources",
#"//third_party/libvpx", TODO(GYP)
"//third_party/libyuv",
"//third_party/opus",
"//third_party/protobuf:protobuf_lite",
#"//third_party/webrtc/modules/desktop_capture", TODO(GYP)
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
]
forward_dependent_configs_from = [
"//base",
"//net",
"//remoting/proto",
"//third_party/protobuf:protobuf_lite",
]
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//remoting/remoting_version.gni")
static_library("client") {
sources = [
"audio_decode_scheduler.cc",
"audio_decode_scheduler.h",
"audio_player.cc",
"audio_player.h",
"chromoting_client.cc",
"chromoting_client.h",
"chromoting_stats.cc",
"chromoting_stats.h",
"client_context.cc",
"client_context.h",
"client_status_logger.cc",
"client_status_logger.h",
"client_user_interface.h",
"frame_consumer.h",
"frame_consumer_proxy.cc",
"frame_consumer_proxy.h",
"frame_producer.h",
"key_event_mapper.cc",
"key_event_mapper.h",
"server_log_entry_client.cc",
"server_log_entry_client.h",
"software_video_renderer.cc",
"software_video_renderer.h",
"token_fetcher_proxy.cc",
"token_fetcher_proxy.h",
"video_renderer.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
# TODO(GYP) Remove when WebRTC is converted.
configs += [ "//content:webrtc_stub_config" ]
defines = [ "VERSION=$version_full" ]
deps = [
"//remoting/base",
"//remoting/protocol",
"//third_party/libyuv",
#"//third_party/webrtc/modules/desktop_capture", TODO(GYP)
"//third_party/libwebm",
]
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("plugin") {
sources = [
"chromoting_instance.cc",
"chromoting_instance.h",
"delegating_signal_strategy.cc",
"delegating_signal_strategy.h",
"media_source_video_renderer.cc",
"media_source_video_renderer.h",
"normalizing_input_filter_cros.cc",
"normalizing_input_filter_cros.h",
"normalizing_input_filter_mac.cc",
"normalizing_input_filter_mac.h",
"pepper_address_resolver.cc",
"pepper_address_resolver.h",
"pepper_audio_player.cc",
"pepper_audio_player.h",
"pepper_input_handler.cc",
"pepper_input_handler.h",
"pepper_network_manager.cc",
"pepper_network_manager.h",
"pepper_packet_socket_factory.cc",
"pepper_packet_socket_factory.h",
"pepper_plugin_thread_delegate.cc",
"pepper_plugin_thread_delegate.h",
"pepper_port_allocator.cc",
"pepper_port_allocator.h",
"pepper_util.cc",
"pepper_util.h",
"pepper_view.cc",
"pepper_view.h",
]
# TODO(brettw) when a nacl version of this target is made, these files
# won't be part of it.
sources += [
"pepper_entrypoints.cc",
"pepper_entrypoints.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
defines = [ "HAVE_STDINT_H" ] # Required by on2_integer.h.
deps = [
"//net",
"//ppapi:ppapi_cpp_objects",
"//ppapi:ppapi_internal_module",
"//remoting/base",
"//remoting/client",
"//remoting/protocol",
#"//third_party/webrtc/modules/desktop_capture", TODO(GYP)
"//ui/events:dom4_keycode_converter",
]
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//third_party/protobuf/proto_library.gni")
proto_library("proto") {
sources = [
"audio.proto",
"control.proto",
"event.proto",
"internal.proto",
"mux.proto",
"video.proto"
]
}
......@@ -8,6 +8,7 @@
},
'targets': [
{
# GN version: //remoting/proto
'target_name': 'chromotocol_proto_lib',
'type': 'static_library',
'sources': [
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("protocol") {
sources = [
"audio_reader.cc",
"audio_reader.h",
"audio_stub.h",
"audio_writer.cc",
"audio_writer.h",
"auth_util.cc",
"auth_util.h",
"authentication_method.cc",
"authentication_method.h",
"authenticator.cc",
"authenticator.h",
"buffered_socket_writer.cc",
"buffered_socket_writer.h",
"channel_authenticator.h",
"channel_dispatcher_base.cc",
"channel_dispatcher_base.h",
"channel_multiplexer.cc",
"channel_multiplexer.h",
"chromium_port_allocator.cc",
"chromium_port_allocator.h",
"chromium_socket_factory.cc",
"chromium_socket_factory.h",
"client_control_dispatcher.cc",
"client_control_dispatcher.h",
"client_event_dispatcher.cc",
"client_event_dispatcher.h",
"client_stub.h",
"clipboard_echo_filter.cc",
"clipboard_echo_filter.h",
"clipboard_filter.cc",
"clipboard_filter.h",
"clipboard_stub.h",
"clipboard_thread_proxy.cc",
"clipboard_thread_proxy.h",
"connection_to_client.cc",
"connection_to_client.h",
"connection_to_host.cc",
"connection_to_host.h",
"content_description.cc",
"content_description.h",
"errors.h",
"host_control_dispatcher.cc",
"host_control_dispatcher.h",
"host_event_dispatcher.cc",
"host_event_dispatcher.h",
"host_stub.h",
"input_event_tracker.cc",
"input_event_tracker.h",
"input_filter.cc",
"input_filter.h",
"input_stub.h",
"it2me_host_authenticator_factory.cc",
"it2me_host_authenticator_factory.h",
"jingle_messages.cc",
"jingle_messages.h",
"jingle_session.cc",
"jingle_session.h",
"jingle_session_manager.cc",
"jingle_session_manager.h",
"libjingle_transport_factory.cc",
"libjingle_transport_factory.h",
"me2me_host_authenticator_factory.cc",
"me2me_host_authenticator_factory.h",
"message_decoder.cc",
"message_decoder.h",
"message_reader.cc",
"message_reader.h",
"message_serialization.cc",
"message_serialization.h",
"monitored_video_stub.cc",
"monitored_video_stub.h",
"mouse_input_filter.cc",
"mouse_input_filter.h",
"name_value_map.h",
"negotiating_authenticator_base.cc",
"negotiating_authenticator_base.h",
"negotiating_client_authenticator.cc",
"negotiating_client_authenticator.h",
"negotiating_host_authenticator.cc",
"negotiating_host_authenticator.h",
"network_settings.cc",
"network_settings.h",
"pairing_authenticator_base.cc",
"pairing_authenticator_base.h",
"pairing_client_authenticator.cc",
"pairing_client_authenticator.h",
"pairing_host_authenticator.cc",
"pairing_host_authenticator.h",
"pairing_registry.cc",
"pairing_registry.h",
"protobuf_video_reader.cc",
"protobuf_video_reader.h",
"protobuf_video_writer.cc",
"protobuf_video_writer.h",
"session.h",
"session_config.cc",
"session_config.h",
"session_manager.h",
"socket_util.cc",
"socket_util.h",
"ssl_hmac_channel_authenticator.cc",
"ssl_hmac_channel_authenticator.h",
"third_party_authenticator_base.cc",
"third_party_authenticator_base.h",
"third_party_client_authenticator.cc",
"third_party_client_authenticator.h",
"third_party_host_authenticator.cc",
"third_party_host_authenticator.h",
"token_validator.h",
"transport.cc",
"transport.h",
"v2_authenticator.cc",
"v2_authenticator.h",
"video_reader.cc",
"video_reader.h",
"video_stub.h",
"video_writer.cc",
"video_writer.h",
"../signaling/iq_sender.cc",
"../signaling/iq_sender.h",
"../signaling/jingle_info_request.cc",
"../signaling/jingle_info_request.h",
"../signaling/log_to_server.cc",
"../signaling/log_to_server.h",
"../signaling/server_log_entry.cc",
"../signaling/server_log_entry.h",
"../signaling/signal_strategy.h",
"../signaling/xmpp_signal_strategy.cc",
"../signaling/xmpp_signal_strategy.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
# TODO(GYP) Remove when WebRTC/jingle is converted.
configs += [
"//content:webrtc_stub_config",
"//content:libjingle_stub_config",
]
deps = [
"//base",
"//crypto",
"//net",
"//remoting/base",
#'../jingle/jingle.gyp:jingle_glue', TODO(GYP)
#'../jingle/jingle.gyp:notifier', TODO(GYP)
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
]
forward_dependent_configs_from = [
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
]
# TODO(GYP) Remove when jingle is converted.
direct_dependent_configs = [ "//content:libjingle_stub_config" ]
}
......@@ -51,6 +51,7 @@
}],
],
'remoting_locales': [
# Note: list duplicated in GN build. See //remoting/resources/BUILD.gn
'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es',
'es-419', 'et', 'fi', 'fil', 'fr', 'he', 'hi', 'hr', 'hu', 'id',
'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT',
......@@ -149,6 +150,7 @@
}, # end of target 'remoting_breakpad'
{
# GN version: //remoting/resources
'target_name': 'remoting_resources',
'type': 'none',
'dependencies': [
......@@ -183,6 +185,7 @@
},
'actions': [
{
# GN version: //remoting/resources:verify_resources
'action_name': 'verify_resources',
'inputs': [
'resources/remoting_strings.grd',
......@@ -201,6 +204,7 @@
],
},
{
# GN version: //remoting/resources:strings
'action_name': 'remoting_strings',
'variables': {
'grit_grd_file': 'resources/remoting_strings.grd',
......@@ -208,6 +212,7 @@
'includes': [ '../build/grit_action.gypi' ],
},
{
# GN version: //remoting/resources:copy_locales
'action_name': 'copy_locales',
'variables': {
'copy_output_dir%': '<(PRODUCT_DIR)',
......@@ -232,6 +237,7 @@
}, # end of target 'remoting_resources'
{
# GN version: //remoting/base
'target_name': 'remoting_base',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
......@@ -267,6 +273,7 @@
}, # end of target 'remoting_base'
{
# GN version: //remoting/protocol
'target_name': 'remoting_protocol',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
......
......@@ -5,6 +5,7 @@
{
'targets': [
{
# GN version: //remoting/client/plugin
'target_name': 'remoting_client_plugin',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
......@@ -29,6 +30,7 @@
}, # end of target 'remoting_client_plugin'
{
# GN version: //remoting/client
'target_name': 'remoting_client',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
......@@ -52,6 +54,7 @@
'type': 'none',
'actions': [
{
# GN version: //remoting/webapp:html
'action_name': 'Build Remoting Webapp main.html',
'inputs': [
'webapp/build-html.py',
......
......@@ -5,6 +5,8 @@
{
'variables': {
'remoting_base_sources': [
# Note: sources list duplicated in GN build.
# See remoting/base/BUILD.gn
'base/auth_token_util.cc',
'base/auth_token_util.h',
'base/auto_thread.cc',
......@@ -67,6 +69,8 @@
],
'remoting_protocol_sources': [
# Note: sources list duplicated in GN build.
# See remoting/protocol/BUILD.gn
'protocol/audio_reader.cc',
'protocol/audio_reader.h',
'protocol/audio_stub.h',
......@@ -199,6 +203,8 @@
],
'remoting_client_sources': [
# Note: sources list duplicated in GN build.
# See remoting/client/BUILD.gn
'client/audio_decode_scheduler.cc',
'client/audio_decode_scheduler.h',
'client/audio_player.cc',
......@@ -228,6 +234,8 @@
],
'remoting_client_plugin_sources': [
# Note: sources list duplicated in GN build.
# See remoting/client/plugin/BUILD.gn
'client/plugin/chromoting_instance.cc',
'client/plugin/chromoting_instance.h',
'client/plugin/delegating_signal_strategy.cc',
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(brettw) Forking out to Python 4 times in serial just to get version
# numbers is highly undesirable. Instead, there should be a build step to
# generate an appropriate header so that the version can be generated at
# build-time, and not at GN-time.
# The |major|, |build| and |patch| versions are inherited from Chrome.
# Since Chrome's |minor| version is always '0', we replace it with a
# Chromoting-specific patch version.
# Note that we check both the |chrome_version_path| file and the
# |remoting_version_path| so that we can override the Chrome version
# numbers if needed.
_version_py_abspath = "//build/util/version.py"
_remoting_version_abspath = "//remoting/VERSION"
_chrome_version_abspath = "//chrome/VERSION"
# Set these files as being input dependencies to the scripts, so the build will
# be re-run if the files change.
_script_deps = [ _remoting_version_abspath, _chrome_version_abspath ]
_chrome_version_path = rebase_path(_chrome_version_abspath, root_build_dir)
_remoting_version_path = rebase_path(_remoting_version_abspath, root_build_dir)
version_major = exec_script(
_version_py_abspath,
[ "-f", _chrome_version_path,
"-f", _remoting_version_path,
"-t \"@MAJOR@\"" ],
"value",
_script_deps)
version_minor = exec_script(
_version_py_abspath,
[ "-f", _remoting_version_path,
"-t \"@REMOTING_PATCH@\"" ],
"value",
_script_deps)
version_short = "${version_major}.${version_minor}." + exec_script(
_version_py_abspath,
[ "-f", _chrome_version_path,
"-f", _remoting_version_path,
"-t \"@BUILD@\"" ],
"value",
_script_deps)
version_full = "${version_short}." + exec_script(
_version_py_abspath,
[ "-f", _chrome_version_path,
"-f", _remoting_version_path,
"-t \"@PATCH@\"" ],
"value",
_script_deps)
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//tools/grit/grit_rule.gni")
# See also remoting_locales_with_underscores below.
remoting_locales = [
"ar",
"bg",
"ca",
"cs",
"da",
"de",
"el",
"en",
"en-GB",
"es",
"es-419",
"et",
"fi",
"fil",
"fr",
"he",
"hi",
"hr",
"hu",
"id",
"it",
"ja",
"ko",
"lt",
"lv",
"nb",
"nl",
"pl",
"pt-BR",
"pt-PT",
"ro",
"ru",
"sk",
"sl",
"sr",
"sv",
"th",
"tr",
"uk",
"vi",
"zh-CN",
"zh-TW",
]
# Some locales have hyphens in the names but for some uses underscores are
# needed.
remoting_locales_with_underscores = remoting_locales
remoting_locales_with_underscores -= [
"en-GB",
"es-419",
"pt-BR",
"pt-PT",
"zh-CN",
"zh-TW",
]
remoting_locales_with_underscores += [
"en_GB",
"es_419",
"pt_BR",
"pt_PT",
"zh_CN",
"zh_TW",
]
group("resources") {
deps = [
":copy_locales",
":strings",
#":verify_resources", TODO(GYP) enable this.
]
}
# TODO(GYP) enable verify_resources. The bots are complaining about
# gen/main.html not being found but this doesn't seems to reproduce locally.
if (false) {
action("verify_resources") {
script = "//remoting/tools/verify_resources.py"
sources_to_verify = [
"$root_gen_dir/main.html",
"../base/resources_unittest.cc",
"../host/continue_window_mac.mm",
"../host/disconnect_window_mac.mm",
"../host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
"../host/mac/me2me_preference_pane-InfoPlist.strings.jinja2",
"../host/win/core.rc.jinja2",
"../host/win/host_messages.mc.jinja2",
"../host/win/version.rc.jinja2",
"../resources/play_store_resources.cc",
"../webapp/background/background.js",
"../webapp/butter_bar.js",
"../webapp/client_screen.js",
"../webapp/error.js",
"../webapp/host_list.js",
"../webapp/host_setup_dialog.js",
"../webapp/host_table_entry.js",
"../webapp/manifest.json.jinja2",
"../webapp/paired_client_manager.js",
"../webapp/remoting.js",
"../webapp/window_frame.js",
]
inputs = [
"remoting_strings.grd",
] + sources_to_verify
stampfile = "$root_build_dir/remoting_resources_verified_stamp"
outputs = [ stampfile ]
args = [
"-t", rebase_path(stampfile, root_build_dir),
"-r", rebase_path("remoting_strings.grd", root_build_dir),
] + rebase_path(sources_to_verify, root_build_dir)
deps = [ "//remoting/webapp:html" ] # Generates main.html.
}
} # if false
grit("strings") {
source = "remoting_strings.grd"
output_name = "remoting_strings"
# The grd file encodes "remoting/..." in the name, so root everything in the
# generated file root.
output_dir = root_gen_dir
resource_ids = "resource_ids"
outputs = [
"remoting/base/string_resources.h",
]
# The grd produces a *.pak file and a messages.json file (this one uses
# underscores instead of hyphens) for each locale.
outputs += process_file_template(
remoting_locales,
[ "remoting/resources/{{source_name_part}}.pak" ])
outputs += process_file_template(
remoting_locales_with_underscores,
[ "remoting/webapp/_locales/{{source_name_part}}/messages.json" ])
}
action("copy_locales") {
script = "../tools/build/remoting_copy_locales.py"
# The gyp build calls out to Python, but the Python just computes a simple
# replacement over the locales. Here, we can do this in GN script by
# pretending the locale list is a list of files. The {{source_name_part}}
# will just expand to the locale name.
inputs = process_file_template(
remoting_locales,
[ "$target_gen_dir/{{source_name_part}}.pak" ])
# Likewise, process the outputs in the same way as the inputs.
if (is_mac || is_ios) {
# On mac, use underscores instead of hyphens and put the files in a
# different place.
outputs = process_file_template(
remoting_locales_with_underscores,
[ "$root_build_dir/remoting/resources/{{source_name_part}}.lproj/locale.pak" ])
} else {
outputs = process_file_template(
remoting_locales,
[ "$root_build_dir/remoting_locales/{{source_name_part}}.pak" ])
}
args = [
"-p", os,
"-g", rebase_path(root_gen_dir, root_build_dir),
"-x", rebase_path(root_out_dir, root_build_dir),
] + remoting_locales
deps = [ ":strings" ]
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
action("html") {
script = "build-html.py"
remoting_webapp_template_main = "html/template_main.html"
remoting_webapp_template_files = [
"html/butterbar.html",
"html/client_plugin.html",
"html/dialog_auth.html",
"html/dialog_client_connect_failed.html",
"html/dialog_client_connecting.html",
"html/dialog_client_host_needs_upgrade.html",
"html/dialog_client_pin_prompt.html",
"html/dialog_client_session_finished.html",
"html/dialog_client_third_party_auth.html",
"html/dialog_client_unconnected.html",
"html/dialog_confirm_host_delete.html",
"html/dialog_connection_history.html",
"html/dialog_host.html",
"html/dialog_host_install.html",
"html/dialog_host_setup.html",
"html/dialog_manage_pairings.html",
"html/dialog_token_refresh_failed.html",
"html/toolbar.html",
"html/ui_header.html",
"html/ui_it2me.html",
"html/ui_me2me.html",
"html/window_frame.html",
]
# Remoting core JavaScript files.
remoting_webapp_js_core_files = [
"base.js",
"error.js",
"event_handlers.js",
"plugin_settings.js",
# TODO(garykac) Split out UI client stuff from remoting.js.
"remoting.js",
"typecheck.js",
"xhr.js",
]
# Auth (client to host) JavaScript files.
remoting_webapp_js_auth_client2host_files = [
"third_party_host_permissions.js",
"third_party_token_fetcher.js",
]
# Auth (Google account) JavaScript files.
remoting_webapp_js_auth_google_files = [
"identity.js",
"oauth2.js",
"oauth2_api.js",
]
# Client JavaScript files.
remoting_webapp_js_client_files = [
"client_plugin.js",
# TODO(garykac) For client_screen:
# * Split out pin/access code stuff into separate file.
# * Move client logic into session_connector
"client_screen.js",
"client_session.js",
"clipboard.js",
"hangout_session.js",
"media_source_renderer.js",
"session_connector.js",
"smart_reconnector.js",
"video_frame_recorder.js",
]
# gnubby authentication JavaScript files.
remoting_webapp_js_gnubby_auth_files = [
"gnubby_auth_handler.js",
]
# cast extension handler JavaScript files.
remoting_webapp_js_cast_extension_files = [
"cast_extension_handler.js",
]
# Host JavaScript files.
# Includes both it2me and me2me files.
remoting_webapp_js_host_files = [
"host_controller.js",
"host_daemon_facade.js",
"it2me_host_facade.js",
"host_session.js",
]
# Logging and stats JavaScript files.
remoting_webapp_js_logging_files = [
"format_iq.js",
"log_to_server.js",
"server_log_entry.js",
"stats_accumulator.js",
]
# UI JavaScript files.
remoting_webapp_js_ui_files = [
"butter_bar.js",
"connection_stats.js",
"feedback.js",
"fullscreen.js",
"fullscreen_v1.js",
"fullscreen_v2.js",
"l10n.js",
"menu_button.js",
"options_menu.js",
"ui_mode.js",
"toolbar.js",
"window_frame.js",
]
# UI files for controlling the local machine as a host.
remoting_webapp_js_ui_host_control_files = [
"host_screen.js",
"host_setup_dialog.js",
"host_install_dialog.js",
"host_installer.js",
"paired_client_manager.js",
]
# UI files for displaying (in the client) info about available hosts.
remoting_webapp_js_ui_host_display_files = [
"host.js",
"host_list.js",
"host_settings.js",
"host_table_entry.js",
]
# Remoting WCS container JavaScript files.
remoting_webapp_js_wcs_container_files = [
"wcs_sandbox_container.js",
]
# Browser test JavaScript files (uncomment if used below).
#remoting_webapp_js_browser_test_files = [
# "browser_test/browser_test.js",
# "browser_test/bump_scroll_browser_test.js",
# "browser_test/cancel_pin_browser_test.js",
# "browser_test/invalid_pin_browser_test.js",
# "browser_test/update_pin_browser_test.js",
#]
# The JavaScript files required by main.html.
remoting_webapp_main_html_js_files =
# Include the core files first as it is required by the other files.
# Otherwise, Jscompile will complain.
remoting_webapp_js_core_files +
remoting_webapp_js_auth_client2host_files +
remoting_webapp_js_auth_google_files +
remoting_webapp_js_client_files +
remoting_webapp_js_gnubby_auth_files +
remoting_webapp_js_cast_extension_files +
remoting_webapp_js_host_files +
remoting_webapp_js_logging_files +
remoting_webapp_js_ui_files +
remoting_webapp_js_ui_host_control_files +
remoting_webapp_js_ui_host_display_files +
remoting_webapp_js_wcs_container_files
# Uncomment this line to include browser test files in the web app
# to expedite debugging or local development.
#+ remoting_webapp_js_browser_test_files
inputs = [ remoting_webapp_template_main ] +
remoting_webapp_template_files +
remoting_webapp_main_html_js_files
outputs = [
"$root_gen_dir/main.html",
]
# Template files are relative to this directory. This passes some template
# files to the script, and the script reads templates from the files on disk.
# They all have to be relative to the same directory. The GYP build made all
# of these relative to the remoting directory, so this does the same.
template_rel_dir = "//remoting"
# TODO(brettw) It's very bad to put this file named "main" in the root
# generated file directory.
args = [
rebase_path("$root_gen_dir/main.html", template_rel_dir),
rebase_path(remoting_webapp_template_main, template_rel_dir),
]
args += [ "--template" ] +
rebase_path(remoting_webapp_template_files, template_rel_dir)
args += [ "--js" ] +
rebase_path(remoting_webapp_main_html_js_files, template_rel_dir)
args += [ "--dir-for-templates",
rebase_path(template_rel_dir, root_build_dir) ]
}
# TODO(GYP) wcs_sandbox.html
......@@ -32,11 +32,12 @@ class HtmlChecker(HTMLParser):
class GenerateWebappHtml:
def __init__(self, template_files, js_files, instrumented_js_files):
def __init__(self, template_files, js_files, instrumented_js_files,
template_rel_dir):
self.js_files = js_files
self.instrumented_js_files = instrumented_js_files
self.template_rel_dir = template_rel_dir
self.templates_expected = set()
for template in template_files:
......@@ -69,7 +70,8 @@ class GenerateWebappHtml:
return False
def processTemplate(self, output, template_file, indent):
with open(template_file, 'r') as input_template:
with open(os.path.join(self.template_rel_dir, template_file), 'r') as \
input_template:
first_line = True
skip_header_comment = False
......@@ -128,6 +130,10 @@ def parseArgs():
nargs='*',
default=[],
help='Javascript to include and instrument for code coverage')
parser.add_argument(
'--dir-for-templates',
default = ".",
help='Directory template references in html are relative to')
parser.add_argument('output_file')
parser.add_argument('input_template')
return parser.parse_args(sys.argv[1:])
......@@ -146,7 +152,8 @@ def main():
# Generate the main HTML file from the templates.
with open(out_file, 'w') as output:
gen = GenerateWebappHtml(args.templates, js_files, args.instrument_js)
gen = GenerateWebappHtml(args.templates, js_files, args.instrument_js,
args.dir_for_templates)
gen.processTemplate(output, args.input_template, 0)
# Verify that all the expected templates were found.
......
......@@ -13,6 +13,8 @@ component("wm") {
"core/capture_controller.h",
"core/compound_event_filter.cc",
"core/compound_event_filter.h",
"core/coordinate_conversion.cc",
"core/coordinate_conversion.h",
"core/cursor_manager.cc",
"core/cursor_manager.h",
"core/default_activation_client.cc",
......
......@@ -28,6 +28,7 @@
'WM_IMPLEMENTATION',
],
'sources': [
# Note: sources list duplicated in GN build.
'core/accelerator_delegate.h',
'core/accelerator_filter.cc',
'core/accelerator_filter.h',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment