Skip to content

Commit

Permalink
Add some remoting targets to GN build.
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
Brett Wilson committed Aug 25, 2014
1 parent 8fbaaa3 commit 1c69399
Show file tree
Hide file tree
Showing 29 changed files with 956 additions and 23 deletions.
2 changes: 2 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ group("root") {
"//pdf",
"//ppapi:ppapi_c",
"//printing",
"//remoting/client/plugin",
"//sandbox",
"//sdch",
"//skia",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion build/config/features.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 16 additions & 14 deletions chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -137,6 +139,7 @@ static_library("browser") {
configs += [ "//content:webrtc_stub_config" ]

deps += [
"//apps",
"//cc",
"//chrome/browser/devtools",
"//chrome/browser/performance_monitor",
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions components/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions components/metrics/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
# 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",
"metrics_hashes.cc",
"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",
Expand Down
33 changes: 33 additions & 0 deletions components/renderer_context_menu/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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",
]
}
2 changes: 2 additions & 0 deletions components/translate/core/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions components/variations.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 10 additions & 0 deletions components/variations/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
19 changes: 19 additions & 0 deletions extensions/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions extensions/extensions.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions google_apis/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions google_apis/google_apis.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
],
'targets': [
{
# GN version: //media
'target_name': 'media',
'type': '<(component)',
'dependencies': [
Expand Down Expand Up @@ -999,6 +1000,7 @@
],
},
{
# GN version: //media:media_unittests
'target_name': 'media_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
Expand Down Expand Up @@ -1287,6 +1289,7 @@
],
},
{
# GN version: //media:media_perftests
'target_name': 'media_perftests',
'type': '<(gtest_target_type)',
'dependencies': [
Expand Down Expand Up @@ -1338,6 +1341,7 @@
],
},
{
# GN version: //media:test_support
'target_name': 'media_test_support',
'type': 'static_library',
'dependencies': [
Expand Down Expand Up @@ -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': [
Expand Down Expand Up @@ -1709,6 +1714,7 @@
['media_use_ffmpeg==1', {
'targets': [
{
# GN version: //media:ffmpeg_unittests
'target_name': 'ffmpeg_unittests',
'type': 'executable',
'dependencies': [
Expand All @@ -1725,6 +1731,7 @@
],
},
{
# GN version: //media:ffmpeg_regression_tests
'target_name': 'ffmpeg_regression_tests',
'type': 'executable',
'dependencies': [
Expand Down
Loading

0 comments on commit 1c69399

Please sign in to comment.