Commit 7f2b78ed authored by brettw@chromium.org's avatar brettw@chromium.org

Work toward a chrome/common GN target.

This adds more of the chrome/common target. The sources don't all compile yet so this is commented out.

Add many resources targets required my chrome/common.

R=thestig@chromium.org
TBR=thestig@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278586 0039d316-1c4b-4281-b951-d872f2087c98
parent 89e4b742
...@@ -21,7 +21,7 @@ group("root") { ...@@ -21,7 +21,7 @@ group("root") {
"//apps/common/api:apps_api", "//apps/common/api:apps_api",
"//cc", "//cc",
"//chrome:resources", "//chrome/common",
"//components/favicon_base", "//components/favicon_base",
"//components/language_usage_metrics", "//components/language_usage_metrics",
"//components/metrics", "//components/metrics",
...@@ -142,6 +142,7 @@ group("root") { ...@@ -142,6 +142,7 @@ group("root") {
if (is_android) { if (is_android) {
deps -= [ deps -= [
"//cc", "//cc",
"//chrome/common", # Blocked on content.
"//content", "//content",
"//components/keyed_service/content", # Blocked on content. "//components/keyed_service/content", # Blocked on content.
"//components/user_prefs", # Blocked on content. "//components/user_prefs", # Blocked on content.
......
...@@ -96,6 +96,11 @@ def LoadPythonDictionary(path): ...@@ -96,6 +96,11 @@ def LoadPythonDictionary(path):
if 'target_conditions' in file_data: if 'target_conditions' in file_data:
del file_data['target_conditions'] del file_data['target_conditions']
# Strip targets in the toplevel, since some files define these and we can't
# slurp them in.
if 'targets' in file_data:
del file_data['targets']
return file_data return file_data
......
...@@ -19,3 +19,13 @@ group("resources") { ...@@ -19,3 +19,13 @@ group("resources") {
deps += [ "//chrome/common:extensions_api_resources" ] deps += [ "//chrome/common:extensions_api_resources" ]
} }
} }
# GYP version: chrome/chrome_resources.gyp:chrome_strings
group("strings") {
deps = [
"//chrome/app:chromium_strings",
"//chrome/app:generated_resources",
"//chrome/app:google_chrome_strings",
"//chrome/app/resources:locale_settings",
]
}
# 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")
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_generated_resources action)
grit("generated_resources") {
source = "generated_resources.grd"
}
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_google_chrome_strings action)
grit("google_chrome_strings") {
source = "google_chrome_strings.grd"
}
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_chromium_strings action)
grit("chromium_strings") {
source = "chromium_strings.grd"
}
# 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")
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_locale_settings action)
grit("locale_settings") {
source = "locale_settings.grd"
}
# 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")
# GYP version: chrome/chrome_resources.gyp:theme_resources
grit("theme_resources") {
source = "theme_resources.grd"
}
...@@ -60,48 +60,18 @@ ...@@ -60,48 +60,18 @@
'common/custom_handlers/protocol_handler.cc', 'common/custom_handlers/protocol_handler.cc',
'common/custom_handlers/protocol_handler.h', 'common/custom_handlers/protocol_handler.h',
'common/descriptors_android.h', 'common/descriptors_android.h',
'common/extensions/api/bluetooth/bluetooth_manifest_data.cc',
'common/extensions/api/bluetooth/bluetooth_manifest_data.h',
'common/extensions/api/bluetooth/bluetooth_manifest_handler.cc',
'common/extensions/api/bluetooth/bluetooth_manifest_handler.h',
'common/extensions/api/bluetooth/bluetooth_manifest_permission.cc',
'common/extensions/api/bluetooth/bluetooth_manifest_permission.h',
'common/extensions/api/commands/commands_handler.cc',
'common/extensions/api/commands/commands_handler.h',
'common/extensions/api/extension_action/action_info.cc', 'common/extensions/api/extension_action/action_info.cc',
'common/extensions/api/extension_action/action_info.h', 'common/extensions/api/extension_action/action_info.h',
'common/extensions/api/extension_action/browser_action_handler.cc',
'common/extensions/api/extension_action/browser_action_handler.h',
'common/extensions/api/extension_action/page_action_handler.cc',
'common/extensions/api/extension_action/page_action_handler.h',
'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
'common/extensions/api/file_browser_handlers/file_browser_handler.h',
'common/extensions/api/i18n/default_locale_handler.cc', 'common/extensions/api/i18n/default_locale_handler.cc',
'common/extensions/api/i18n/default_locale_handler.h', 'common/extensions/api/i18n/default_locale_handler.h',
'common/extensions/api/identity/oauth2_manifest_handler.cc', 'common/extensions/api/identity/oauth2_manifest_handler.cc',
'common/extensions/api/identity/oauth2_manifest_handler.h', 'common/extensions/api/identity/oauth2_manifest_handler.h',
'common/extensions/api/input_ime/input_components_handler.cc',
'common/extensions/api/input_ime/input_components_handler.h',
'common/extensions/api/managed_mode_private/managed_mode_handler.cc', 'common/extensions/api/managed_mode_private/managed_mode_handler.cc',
'common/extensions/api/managed_mode_private/managed_mode_handler.h', 'common/extensions/api/managed_mode_private/managed_mode_handler.h',
'common/extensions/api/notifications/notification_style.cc',
'common/extensions/api/notifications/notification_style.h',
'common/extensions/api/omnibox/omnibox_handler.cc',
'common/extensions/api/omnibox/omnibox_handler.h',
'common/extensions/api/plugins/plugins_handler.cc', 'common/extensions/api/plugins/plugins_handler.cc',
'common/extensions/api/plugins/plugins_handler.h', 'common/extensions/api/plugins/plugins_handler.h',
'common/extensions/api/speech/tts_engine_manifest_handler.cc',
'common/extensions/api/speech/tts_engine_manifest_handler.h',
'common/extensions/api/spellcheck/spellcheck_handler.cc',
'common/extensions/api/spellcheck/spellcheck_handler.h',
'common/extensions/api/storage/storage_schema_manifest_handler.cc', 'common/extensions/api/storage/storage_schema_manifest_handler.cc',
'common/extensions/api/storage/storage_schema_manifest_handler.h', 'common/extensions/api/storage/storage_schema_manifest_handler.h',
'common/extensions/api/system_indicator/system_indicator_handler.cc',
'common/extensions/api/system_indicator/system_indicator_handler.h',
'common/extensions/api/url_handlers/url_handlers_parser.cc',
'common/extensions/api/url_handlers/url_handlers_parser.h',
'common/extensions/api/webstore/webstore_api_constants.cc',
'common/extensions/api/webstore/webstore_api_constants.h',
'common/extensions/chrome_extension_messages.h', 'common/extensions/chrome_extension_messages.h',
'common/extensions/chrome_extensions_client.cc', 'common/extensions/chrome_extensions_client.cc',
'common/extensions/chrome_extensions_client.h', 'common/extensions/chrome_extensions_client.h',
...@@ -259,6 +229,38 @@ ...@@ -259,6 +229,38 @@
'common/worker_thread_ticker.cc', 'common/worker_thread_ticker.cc',
'common/worker_thread_ticker.h', 'common/worker_thread_ticker.h',
], ],
'chrome_common_extensions_sources': [
'common/extensions/api/bluetooth/bluetooth_manifest_data.cc',
'common/extensions/api/bluetooth/bluetooth_manifest_data.h',
'common/extensions/api/bluetooth/bluetooth_manifest_handler.cc',
'common/extensions/api/bluetooth/bluetooth_manifest_handler.h',
'common/extensions/api/bluetooth/bluetooth_manifest_permission.cc',
'common/extensions/api/bluetooth/bluetooth_manifest_permission.h',
'common/extensions/api/commands/commands_handler.cc',
'common/extensions/api/commands/commands_handler.h',
'common/extensions/api/extension_action/browser_action_handler.cc',
'common/extensions/api/extension_action/browser_action_handler.h',
'common/extensions/api/extension_action/page_action_handler.cc',
'common/extensions/api/extension_action/page_action_handler.h',
'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
'common/extensions/api/file_browser_handlers/file_browser_handler.h',
'common/extensions/api/input_ime/input_components_handler.cc',
'common/extensions/api/input_ime/input_components_handler.h',
'common/extensions/api/notifications/notification_style.cc',
'common/extensions/api/notifications/notification_style.h',
'common/extensions/api/omnibox/omnibox_handler.cc',
'common/extensions/api/omnibox/omnibox_handler.h',
'common/extensions/api/speech/tts_engine_manifest_handler.cc',
'common/extensions/api/speech/tts_engine_manifest_handler.h',
'common/extensions/api/spellcheck/spellcheck_handler.cc',
'common/extensions/api/spellcheck/spellcheck_handler.h',
'common/extensions/api/system_indicator/system_indicator_handler.cc',
'common/extensions/api/system_indicator/system_indicator_handler.h',
'common/extensions/api/url_handlers/url_handlers_parser.cc',
'common/extensions/api/url_handlers/url_handlers_parser.h',
'common/extensions/api/webstore/webstore_api_constants.cc',
'common/extensions/api/webstore/webstore_api_constants.h',
],
}, },
'targets': [ 'targets': [
{ {
...@@ -319,26 +321,13 @@ ...@@ -319,26 +321,13 @@
], ],
'conditions': [ 'conditions': [
['enable_extensions==1', { ['enable_extensions==1', {
'sources': [
'<@(chrome_common_extensions_sources)',
],
'dependencies': [ 'dependencies': [
'../device/bluetooth/bluetooth.gyp:device_bluetooth', '../device/bluetooth/bluetooth.gyp:device_bluetooth',
'../device/usb/usb.gyp:device_usb', '../device/usb/usb.gyp:device_usb',
], ],
}, { # enable_extensions == 0
'sources/': [
['exclude', '^common/extensions/api/'],
['include', 'common/extensions/api/extension_action/action_info.cc'],
['include', 'common/extensions/api/extension_action/action_info.h'],
['include', 'common/extensions/api/i18n/default_locale_handler.cc'],
['include', 'common/extensions/api/i18n/default_locale_handler.h'],
['include', 'common/extensions/api/identity/oauth2_manifest_handler.cc'],
['include', 'common/extensions/api/identity/oauth2_manifest_handler.h'],
['include', 'common/extensions/api/managed_mode_private/managed_mode_handler.cc'],
['include', 'common/extensions/api/managed_mode_private/managed_mode_handler.h'],
['include', 'common/extensions/api/plugins/plugins_handler.cc'],
['include', 'common/extensions/api/plugins/plugins_handler.h'],
['include', 'common/extensions/api/storage/storage_schema_manifest_handler.cc'],
['include', 'common/extensions/api/storage/storage_schema_manifest_handler.h'],
],
}], }],
['OS=="win" or OS=="mac"', { ['OS=="win" or OS=="mac"', {
'sources': [ 'sources': [
...@@ -585,7 +574,7 @@ ...@@ -585,7 +574,7 @@
], ],
}, },
{ {
# GN version: //chrome/commoon/net:net # GN version: //chrome/common/net:net
'target_name': 'common_net', 'target_name': 'common_net',
'type': 'static_library', 'type': 'static_library',
'sources': [ 'sources': [
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
# to run grit would list its own .grd files, but unfortunately some # to run grit would list its own .grd files, but unfortunately some
# of the static libraries currently have circular dependencies among # of the static libraries currently have circular dependencies among
# generated headers. # generated headers.
#
# GN version: //chrome:resources # GN version: //chrome:resources
'target_name': 'chrome_resources', 'target_name': 'chrome_resources',
'type': 'none', 'type': 'none',
...@@ -228,10 +228,13 @@ ...@@ -228,10 +228,13 @@
# to run grit would list its own .grd files, but unfortunately some # to run grit would list its own .grd files, but unfortunately some
# of the static libraries currently have circular dependencies among # of the static libraries currently have circular dependencies among
# generated headers. # generated headers.
#
# GN version: //chrome:strings
'target_name': 'chrome_strings', 'target_name': 'chrome_strings',
'type': 'none', 'type': 'none',
'actions': [ 'actions': [
{ {
# GN version: //chrome/app/resources:locale_settings
'action_name': 'generate_locale_settings', 'action_name': 'generate_locale_settings',
'variables': { 'variables': {
'grit_grd_file': 'app/resources/locale_settings.grd', 'grit_grd_file': 'app/resources/locale_settings.grd',
...@@ -239,6 +242,7 @@ ...@@ -239,6 +242,7 @@
'includes': [ '../build/grit_action.gypi' ], 'includes': [ '../build/grit_action.gypi' ],
}, },
{ {
# GN version: //chrome/app:chromium_strings
'action_name': 'generate_chromium_strings', 'action_name': 'generate_chromium_strings',
'variables': { 'variables': {
'grit_grd_file': 'app/chromium_strings.grd', 'grit_grd_file': 'app/chromium_strings.grd',
...@@ -246,6 +250,7 @@ ...@@ -246,6 +250,7 @@
'includes': [ '../build/grit_action.gypi' ], 'includes': [ '../build/grit_action.gypi' ],
}, },
{ {
# GN version: //chrome/app:generated_resources
'action_name': 'generate_generated_resources', 'action_name': 'generate_generated_resources',
'variables': { 'variables': {
'grit_grd_file': 'app/generated_resources.grd', 'grit_grd_file': 'app/generated_resources.grd',
...@@ -253,6 +258,7 @@ ...@@ -253,6 +258,7 @@
'includes': [ '../build/grit_action.gypi' ], 'includes': [ '../build/grit_action.gypi' ],
}, },
{ {
# GN version: //chrome/app:google_chrome_strings
'action_name': 'generate_google_chrome_strings', 'action_name': 'generate_google_chrome_strings',
'variables': { 'variables': {
'grit_grd_file': 'app/google_chrome_strings.grd', 'grit_grd_file': 'app/google_chrome_strings.grd',
...@@ -334,6 +340,7 @@ ...@@ -334,6 +340,7 @@
'includes': [ '../build/grit_target.gypi' ], 'includes': [ '../build/grit_target.gypi' ],
}, },
{ {
# GN version: //chrome/app/theme:theme_resources
'target_name': 'theme_resources', 'target_name': 'theme_resources',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
......
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
import("//tools/grit/grit_rule.gni") import("//tools/grit/grit_rule.gni")
# TODO(GYP) uncomment when this is used below.
#gypi_values = exec_script(
# "//build/gypi_to_gn.py",
# [ rebase_path("../chrome_common.gypi") ],
# "scope",
# [ "../chrome_common.gypi" ])
# GYP version: chrome/chrome_resources.gyp:chrome_resources # GYP version: chrome/chrome_resources.gyp:chrome_resources
# (generate_common_resources action) # (generate_common_resources action)
grit("resources") { grit("resources") {
...@@ -16,7 +23,124 @@ grit("extensions_api_resources") { ...@@ -16,7 +23,124 @@ grit("extensions_api_resources") {
source = "extensions_api_resources.grd" source = "extensions_api_resources.grd"
} }
# TODO(GYP) add this target. # GYP version: chrome/chrome_common.gyp:common
#static_library("common") { static_library("common") {
# configs += [ "//build/config/compiler:wexit_time_destructors" ] # TODO(GYP) Uncomment when these compile.
#} #sources = rebase_path(gypi_values.chrome_common_sources, ".", "//chrome")
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":version",
#":installer_util", TODO(GYP)
"//base:base",
"//base:i18n",
"//base:prefs",
"//base:base_static",
"//chrome:resources",
"//chrome:strings",
"//chrome/app/theme:theme_resources",
"//chrome/common:constants",
"//chrome/common/metrics/proto",
"//chrome/common/net",
#"//components/cloud_devices:common", TODO(GYP)
#"//components/json_schema", TODO(GYP)
"//components/metrics",
#"//components/components.gyp:policy_component_common", TODO(GYP)
"//components/translate:translate_core_common",
#"//components/variations", TODO(GYP)
"//content/public/common",
"//crypto",
#"//extensions/extensions_resources.gyp:extensions_resources", TODO(GYP)
#"//extensions/extensions_strings.gyp:extensions_strings", TODO(GYP)
#"//media/cast/cast.gyp:cast_transport", TODO(GYP)
"//net",
"//skia",
"//third_party/icu",
"//third_party/libxml",
"//third_party/sqlite",
"//third_party/zlib:zip",
"//ui/resources:resources",
"//url",
]
}
if (is_linux) {
action("version") {
visibility = ":common"
script = "//build/util/version.py"
lastchange_path = "//build/util/LASTCHANGE"
version_path = "//chrome/VERSION"
template_input_path = "chrome_version_info_posix.h.version"
if (is_chrome_branded) {
branding_path = "//chrome/app/theme/google_chrome/BRANDING"
} else {
branding_path = "//chrome/app/theme/chromium/BRANDING"
}
source_prereqs = [
version_path,
template_input_path,
lastchange_path,
branding_path,
]
outfile = "$target_gen_dir/chrome_version_info_posix.h"
outputs = [ outfile ]
args = [
"-f", rebase_path(version_path, root_build_dir),
"-f", rebase_path(branding_path, root_build_dir),
"-f", rebase_path(lastchange_path, root_build_dir),
rebase_path(template_input_path, root_build_dir),
rebase_path(outfile, root_build_dir),
]
}
} else {
# Other platforms have a different way to do versioning.
group("version") {
}
}
# GN version: chrome/common_constants.gyp:common_constants
static_library("constants") {
sources = [
"chrome_constants.cc",
"chrome_constants.h",
"chrome_icon_resources_win.cc",
"chrome_icon_resources_win.h",
"chrome_paths.cc",
"chrome_paths.h",
"chrome_paths_android.cc",
"chrome_paths_internal.h",
"chrome_paths_linux.cc",
"chrome_paths_mac.mm",
"chrome_paths_win.cc",
"chrome_switches.cc",
"chrome_switches.h",
"env_vars.cc",
"env_vars.h",
"net/test_server_locations.cc",
"net/test_server_locations.h",
"pref_font_script_names-inl.h",
"pref_font_webkit_names.h",
"pref_names.cc",
"pref_names.h",
"widevine_cdm_constants.cc",
"widevine_cdm_constants.h",
]
# TODO(GYP) remove when widevine is supported for real.
configs += [ "//content:widevine_stub_config" ]
deps = [
"//base",
"//base/third_party/dynamic_annotations",
# TODO(GYP)
#'../components/components.gyp:bookmarks_common',
#'../components/nacl.gyp:nacl_switches',
#'../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
# (Also see widevine config above.)
]
}
...@@ -8,5 +8,5 @@ import("//third_party/protobuf/proto_library.gni") ...@@ -8,5 +8,5 @@ import("//third_party/protobuf/proto_library.gni")
proto_library("proto") { proto_library("proto") {
sources = [ sources = [
"chrome_experiments.proto", "chrome_experiments.proto",
} ]
} }
...@@ -36,7 +36,7 @@ static_library("net") { ...@@ -36,7 +36,7 @@ static_library("net") {
"x509_certificate_model.cc", "x509_certificate_model.cc",
] ]
} else { } else {
deps += [ "//gpu:ipc" ] deps += [ "//gpu/ipc" ]
} }
if (is_win || is_mac || is_ios) { if (is_win || is_mac || is_ios) {
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
}, },
'targets': [ 'targets': [
{ {
# GN version: //chrome/common:constants
'target_name': 'common_constants', 'target_name': 'common_constants',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ 'include_dirs': [
......
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