summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-01 23:54:17 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-01 23:54:17 +0000
commit797b25046f036852b50520205064094bd9798c99 (patch)
tree91accfd86fc948f9adc5bd79f2e68c04f330e42a
parentf1650117caf47f6e7b50bcee0b201535294d9cfd (diff)
downloadchromium_src-797b25046f036852b50520205064094bd9798c99.zip
chromium_src-797b25046f036852b50520205064094bd9798c99.tar.gz
chromium_src-797b25046f036852b50520205064094bd9798c99.tar.bz2
Add more GN deps to the build.
These deps are some of those required to compile chrome/browser (so mostly those containing resources and protobufs that have generated headers). chrome/browser still has some dependencies left. Add third_party libs libaddressinput and dom_distiller_js. Add components dom_distiller and policy. Separate the generate_library_loader into a separate .gni file. Rename components_strings to just strings. R=ajwong@chromium.org Review URL: https://codereview.chromium.org/362583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280916 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--BUILD.gn3
-rw-r--r--build/config/linux/BUILD.gn75
-rw-r--r--build/secondary/third_party/cacheinvalidation/BUILD.gn115
-rw-r--r--build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn28
-rw-r--r--chrome/app/BUILD.gn23
-rw-r--r--chrome/app/theme/BUILD.gn10
-rw-r--r--chrome/browser/BUILD.gn45
-rw-r--r--chrome/browser/net/BUILD.gn10
-rw-r--r--chrome/browser/search/suggestions/proto/BUILD.gn9
-rw-r--r--chrome/chrome_browser.gypi2
-rw-r--r--chrome/chrome_resources.gyp2
-rw-r--r--components/BUILD.gn3
-rw-r--r--components/components_resources.gyp3
-rw-r--r--components/components_strings.gyp1
-rw-r--r--components/dom_distiller.gypi5
-rw-r--r--components/dom_distiller/content/BUILD.gn27
-rw-r--r--components/dom_distiller/core/BUILD.gn79
-rw-r--r--components/dom_distiller/core/proto/BUILD.gn13
-rw-r--r--components/dom_distiller/webui/BUILD.gn24
-rw-r--r--components/policy.gypi1
-rw-r--r--components/policy/proto/BUILD.gn22
-rw-r--r--components/resources/BUILD.gn16
-rw-r--r--components/strings/BUILD.gn3
-rw-r--r--device/media_transfer_protocol/BUILD.gn37
-rw-r--r--device/media_transfer_protocol/media_transfer_protocol.gyp3
-rw-r--r--third_party/dom_distiller_js/dom_distiller_js.gyp1
-rw-r--r--third_party/dom_distiller_js/package/proto/BUILD.gn21
-rw-r--r--third_party/libaddressinput/BUILD.gn162
-rw-r--r--third_party/libaddressinput/libaddressinput.gyp8
-rw-r--r--tools/generate_library_loader/generate_library_loader.gni54
30 files changed, 729 insertions, 76 deletions
diff --git a/BUILD.gn b/BUILD.gn
index b067061..2224f68 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -51,6 +51,7 @@ group("root") {
"//third_party/WebKit/public:all_blink",
"//third_party/angle:translator",
"//third_party/brotli",
+ "//third_party/cacheinvalidation",
"//third_party/ffmpeg",
"//third_party/flac",
"//third_party/harfbuzz-ng",
@@ -58,6 +59,7 @@ group("root") {
"//third_party/iccjpeg",
"//third_party/icu",
"//third_party/leveldatabase",
+ "//third_party/libaddressinput",
"//third_party/libpng",
"//third_party/libsrtp",
"//third_party/libusb",
@@ -158,6 +160,7 @@ group("root") {
"//third_party/WebKit/public:all_blink",
# Not tested on Android yet:
+ "//third_party/libaddressinput",
"//third_party/ffmpeg",
"//webkit/browser:storage",
"//webkit/child",
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index bfe242c..bc5bde3 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/linux/pkg_config.gni")
import("//build/config/sysroot.gni")
import("//build/config/ui.gni")
+import("//tools/generate_library_loader/generate_library_loader.gni")
config("sdk") {
if (sysroot != "") {
@@ -107,47 +108,6 @@ pkg_config("gconf") {
defines = [ "USE_GCONF" ]
}
-# name: Name to use for the value of the --name arg.
-# output_h/output_cc: Names for the generated header/cc file with no dir.
-# header: header file to process. Example: "<foo/bar.h>"
-# functions: List of strings for functions to process.
-# config: Label of the config generated by pkgconfig.
-template("generate_library_loader") {
- output_h = "$root_gen_dir/library_loaders/" + invoker.output_h
- output_cc = "$root_gen_dir/library_loaders/" + invoker.output_cc
-
- action_visibility = ":$target_name"
- action("${target_name}_loader") {
- visibility = action_visibility
-
- script = "//tools/generate_library_loader/generate_library_loader.py"
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
-
- outputs = [ output_h, output_cc ]
-
- args = [
- "--name", invoker.name,
- "--output-h", rebase_path(output_h),
- "--output-cc", rebase_path(output_cc),
- "--header", invoker.header,
- # Note GYP build exposes a per-target variable to control this, which, if
- # manually set to true, will disable dlopen(). Its not clear this is
- # needed, so here we just leave off. If this can be done globally, we
- # can expose one switch for this value, otherwise we need to add a template
- # param for this.
- "--link-directly=0",
- ] + invoker.functions
- }
-
- source_set(target_name) {
- direct_dependent_configs = [ invoker.config ]
- sources = [ output_h, output_cc ]
- deps = [ ":${target_name}_loader" ]
- }
-}
-
pkg_config("gio_config") {
packages = [ "gio-2.0" ]
defines = [ "USE_GIO" ]
@@ -173,21 +133,12 @@ generate_library_loader("gio") {
]
}
-# pkgconfig doesn't return anything interesting for this other than -lpci
-# on suppotred systems, so we hardcode.
-config("libpci_config") {
- # This is not needed as long as we're setting link_directly=0 for the library
- # loaders.
- #libs = [ "pci" ]
-}
-
# This generates a target named "libpci".
generate_library_loader("libpci") {
name = "LibPciLoader"
output_h = "libpci.h"
output_cc = "libpci_loader.cc"
header = "<pci/pci.h>"
- config = ":libpci_config"
functions = [
"pci_alloc",
@@ -198,3 +149,27 @@ generate_library_loader("libpci") {
"pci_lookup_name",
]
}
+
+generate_library_loader("libspeechd") {
+ name = "LibSpeechdLoader"
+ output_h = "libspeechd.h"
+ output_cc = "libspeechd.cc"
+ header = "<libspeechd.h>"
+ bundled_header = "\"third_party/speech-dispatcher/libspeechd.h\""
+
+ functions = [
+ "spd_open",
+ "spd_say",
+ "spd_stop",
+ "spd_close",
+ "spd_pause",
+ "spd_resume",
+ "spd_set_notification_on",
+ "spd_set_voice_rate",
+ "spd_set_voice_pitch",
+ "spd_list_synthesis_voices",
+ "spd_set_synthesis_voice",
+ "spd_list_modules",
+ "spd_set_output_module",
+ ]
+}
diff --git a/build/secondary/third_party/cacheinvalidation/BUILD.gn b/build/secondary/third_party/cacheinvalidation/BUILD.gn
new file mode 100644
index 0000000..018e7c8
--- /dev/null
+++ b/build/secondary/third_party/cacheinvalidation/BUILD.gn
@@ -0,0 +1,115 @@
+# 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.
+
+config("cacheinvalidation_config") {
+ include_dirs = [
+ "overrides",
+ "src",
+ ]
+}
+
+static_library("cacheinvalidation") {
+ sources = [
+ "overrides/google/cacheinvalidation/deps/callback.h",
+ "overrides/google/cacheinvalidation/deps/gmock.h",
+ "overrides/google/cacheinvalidation/deps/googletest.h",
+ "overrides/google/cacheinvalidation/deps/logging.h",
+ "overrides/google/cacheinvalidation/deps/mutex.h",
+ "overrides/google/cacheinvalidation/deps/random.h",
+ "overrides/google/cacheinvalidation/deps/random.cc",
+ "overrides/google/cacheinvalidation/deps/sha1-digest-function.h",
+ "overrides/google/cacheinvalidation/deps/scoped_ptr.h",
+ "overrides/google/cacheinvalidation/deps/stl-namespace.h",
+ "overrides/google/cacheinvalidation/deps/string_util.h",
+ "overrides/google/cacheinvalidation/deps/time.h",
+ "src/google/cacheinvalidation/deps/digest-function.h",
+ "src/google/cacheinvalidation/impl/basic-system-resources.cc",
+ "src/google/cacheinvalidation/impl/basic-system-resources.h",
+ "src/google/cacheinvalidation/impl/checking-invalidation-listener.cc",
+ "src/google/cacheinvalidation/impl/checking-invalidation-listener.h",
+ "src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h",
+ "src/google/cacheinvalidation/impl/constants.cc",
+ "src/google/cacheinvalidation/impl/constants.h",
+ "src/google/cacheinvalidation/impl/digest-store.h",
+ "src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.cc",
+ "src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.h",
+ "src/google/cacheinvalidation/impl/invalidation-client-core.cc",
+ "src/google/cacheinvalidation/impl/invalidation-client-core.h",
+ "src/google/cacheinvalidation/impl/invalidation-client-factory.cc",
+ "src/google/cacheinvalidation/impl/invalidation-client-impl.cc",
+ "src/google/cacheinvalidation/impl/invalidation-client-impl.h",
+ "src/google/cacheinvalidation/impl/invalidation-client-util.h",
+ "src/google/cacheinvalidation/impl/log-macro.h",
+ "src/google/cacheinvalidation/impl/object-id-digest-utils.cc",
+ "src/google/cacheinvalidation/impl/object-id-digest-utils.h",
+ "src/google/cacheinvalidation/impl/persistence-utils.cc",
+ "src/google/cacheinvalidation/impl/persistence-utils.h",
+ "src/google/cacheinvalidation/impl/proto-converter.cc",
+ "src/google/cacheinvalidation/impl/proto-converter.h",
+ "src/google/cacheinvalidation/impl/proto-helpers.h",
+ "src/google/cacheinvalidation/impl/proto-helpers.cc",
+ "src/google/cacheinvalidation/impl/protocol-handler.cc",
+ "src/google/cacheinvalidation/impl/protocol-handler.h",
+ "src/google/cacheinvalidation/impl/recurring-task.cc",
+ "src/google/cacheinvalidation/impl/recurring-task.h",
+ "src/google/cacheinvalidation/impl/registration-manager.cc",
+ "src/google/cacheinvalidation/impl/registration-manager.h",
+ "src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h",
+ "src/google/cacheinvalidation/impl/run-state.h",
+ "src/google/cacheinvalidation/impl/safe-storage.cc",
+ "src/google/cacheinvalidation/impl/safe-storage.h",
+ "src/google/cacheinvalidation/impl/simple-registration-store.cc",
+ "src/google/cacheinvalidation/impl/simple-registration-store.h",
+ "src/google/cacheinvalidation/impl/smearer.h",
+ "src/google/cacheinvalidation/impl/statistics.cc",
+ "src/google/cacheinvalidation/impl/statistics.h",
+ "src/google/cacheinvalidation/impl/throttle.cc",
+ "src/google/cacheinvalidation/impl/throttle.h",
+ "src/google/cacheinvalidation/impl/ticl-message-validator.cc",
+ "src/google/cacheinvalidation/impl/ticl-message-validator.h",
+ "src/google/cacheinvalidation/include/invalidation-client.h",
+ "src/google/cacheinvalidation/include/invalidation-client-factory.h",
+ "src/google/cacheinvalidation/include/invalidation-listener.h",
+ "src/google/cacheinvalidation/include/system-resources.h",
+ "src/google/cacheinvalidation/include/types.h",
+ ]
+
+ direct_dependent_configs = [ ":cacheinvalidation_config" ]
+
+ deps = [
+ "src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
+ "//base",
+ ]
+
+ if (is_win) {
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ cflags = [ "/wd4267" ]
+ }
+}
+
+test("cacheinvalidation_unittests") {
+ sources = [
+ "src/google/cacheinvalidation/test/deterministic-scheduler.cc",
+ "src/google/cacheinvalidation/test/deterministic-scheduler.h",
+ "src/google/cacheinvalidation/test/test-logger.cc",
+ "src/google/cacheinvalidation/test/test-logger.h",
+ "src/google/cacheinvalidation/test/test-utils.cc",
+ "src/google/cacheinvalidation/test/test-utils.h",
+ "src/google/cacheinvalidation/impl/invalidation-client-impl_test.cc",
+ "src/google/cacheinvalidation/impl/protocol-handler_test.cc",
+ "src/google/cacheinvalidation/impl/recurring-task_test.cc",
+ "src/google/cacheinvalidation/impl/throttle_test.cc",
+ ]
+
+ deps = [
+ ":cacheinvalidation",
+ "src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
+
+# TODO(GYP) A bunch of Android-specific stuff.
diff --git a/build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn b/build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn
new file mode 100644
index 0000000..9429139
--- /dev/null
+++ b/build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn
@@ -0,0 +1,28 @@
+# 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("cacheinvalidation_proto_cpp") {
+ # Depend on cacheinvalidation instead.
+ visibility = "//third_party/cacheinvalidation/*"
+
+ sources = [
+ "client.proto",
+ "client_gateway.proto",
+ "client_protocol.proto",
+ "client_test_internal.proto",
+ "types.proto",
+ ]
+
+ if (!is_android) {
+ sources += [
+ "android_channel.proto",
+ "channel_common.proto",
+ ]
+ }
+
+ proto_out_dir = "google/cacheinvalidation"
+}
+
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn
index 2addc7b..9ff5c08 100644
--- a/chrome/app/BUILD.gn
+++ b/chrome/app/BUILD.gn
@@ -10,6 +10,29 @@ grit("generated_resources") {
source = "generated_resources.grd"
}
+# GYP version: chrome/chrome_resources.gyp:chrome_strings_map
+action("make_generated_resources_map") {
+ # Targets should depend on generated_resources_map instead.
+ visibility = ":generated_resources_map"
+
+ script = "//chrome/browser/metrics/variations/generate_resources_map.py"
+
+ source_prereqs = [ "$target_gen_dir/grit/generated_resources.h" ]
+ outputs = [ "$target_gen_dir/generated_resources_map.cc" ]
+
+ args = rebase_path(source_prereqs, root_build_dir) +
+ rebase_path(outputs, root_build_dir)
+
+ deps = [ ":generated_resources" ]
+}
+
+# Collect the generated .cc file from make_generated_resources_map and put it
+# in a source set so targets that depend on it will link the source rather than
+# specifying it manually. This doesn't happen in the GYP build.
+source_set("generated_resources_map") {
+ sources = get_target_outputs(":make_generated_resources_map")
+}
+
# GYP version: chrome/chrome_resources.gyp:chrome_strings
# (generate_google_chrome_strings action)
grit("google_chrome_strings") {
diff --git a/chrome/app/theme/BUILD.gn b/chrome/app/theme/BUILD.gn
index 93d3414..5e1d2a5 100644
--- a/chrome/app/theme/BUILD.gn
+++ b/chrome/app/theme/BUILD.gn
@@ -7,4 +7,14 @@ import("//tools/grit/grit_rule.gni")
# GYP version: chrome/chrome_resources.gyp:theme_resources
grit("theme_resources") {
source = "theme_resources.grd"
+
+ deps = [
+ ":chrome_unscaled_resources",
+ "//ui/resources",
+ ]
+}
+
+# GYP version: chrome/chrome_resources.gyp:chrome_unscaled_resources
+grit("chrome_unscaled_resources") {
+ source = "chrome_unscaled_resources.grd"
}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index a81630e..0d54531 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -11,13 +11,14 @@ about_credits_file = "$target_gen_dir/about_credits.html"
additional_modules_list_file =
"$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
+# TODO(brettw) uncomment this when this target compiles.
if (false) {
-#gypi_values = exec_script(
-# "//build/gypi_to_gn.py",
-# [ rebase_path("../chrome_browser.gypi") ],
-# "scope",
-# [ "../chrome_browser.gypi" ])
+gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("../chrome_browser.gypi") ],
+ "scope",
+ [ "../chrome_browser.gypi" ])
static_library("browser") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
@@ -33,14 +34,20 @@ static_library("browser") {
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
+ "//chrome/app:generated_resources_map",
+ "//chrome/app/theme:theme_resources",
+ "//chrome/browser/net:probe_message_proto",
+ "//chrome/browser/search/suggestions/proto",
"//chrome/common",
"//chrome/common/net",
+ "//components/strings",
"//content/public/browser",
"//content/public/common",
"//crypto",
"//skia",
"//sql",
"//sync",
+ "//third_party/cacheinvalidation",
"//third_party/icu",
"//third_party/libxml",
"//third_party/widevine/cdm:version_h",
@@ -52,15 +59,12 @@ static_library("browser") {
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/strings",
+ "//ui/resources",
# TODO(GYP)
#"browser_ui",
#"cert_logger_proto",
- #"chrome_resources.gyp:chrome_strings_map",
#"chrome_resources.gyp:platform_locale_settings",
- #"chrome_resources.gyp:theme_resources",
#"in_memory_url_index_cache_proto",
- #"probe_message_proto",
- #"suggestions_proto",
#"../components/components.gyp:autocomplete",
#"../components/components.gyp:autofill_core_browser",
#"../components/components.gyp:bookmarks_browser",
@@ -99,7 +103,6 @@ static_library("browser") {
#"../components/components.gyp:translate_core_common",
#"../components/components.gyp:url_fixer",
#"../components/components.gyp:user_prefs",
- #"../components/components_strings.gyp:components_strings",
## This depends directly on the variations target, rather than just
## transitively via the common target because the proto sources need to
## be generated before code in this target can start building.
@@ -108,11 +111,8 @@ static_library("browser") {
#"../courgette/courgette.gyp:courgette_lib",
#"../google_apis/google_apis.gyp:google_apis",
#"../jingle/jingle.gyp:notifier",
- #"../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation",
- #"../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp",
#"../third_party/libjingle/libjingle.gyp:libjingle",
#"../ui/message_center/message_center.gyp:message_center",
- #"../ui/resources/ui_resources.gyp:ui_resources",
#"../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs",
]
@@ -138,6 +138,10 @@ static_library("browser") {
# TODO(GYP) Also add these nacl_defines to direct dependents.
#defines = nacl_defines
+
+ # TODO(GYP) remove this when the real webrtc target is used below.
+ configs += [ "//content:webrtc_stub_config" ]
+
deps += [
"//cc",
"//components/visitedlink/browser",
@@ -186,6 +190,7 @@ static_library("browser") {
## TODO(tonyg): Remove this dependency (crbug.com/280157).
#"../testing/perf/perf_test.gyp:*",
#"../third_party/libaddressinput/libaddressinput.gyp:libaddressinput",
+ # Note: for this one also remove the webrtc_stub_config
#"../third_party/webrtc/modules/modules.gyp:desktop_capture",
#"../ui/web_dialogs/web_dialogs.gyp:web_dialogs",
#"../v8/tools/gyp/v8.gyp:v8",
@@ -268,7 +273,7 @@ static_library("browser") {
gypi_values.chrome_browser_policy_shared_with_ios_sources,
".", "//chrome")
deps += [
- #"../components/components.gyp:cloud_policy_proto", TODO(GYP)
+ "//components/policy/proto",
#"../components/components.gyp:policy", TODO(GYP)
]
if (!is_ios) {
@@ -328,17 +333,11 @@ static_library("browser") {
}
if (is_linux) {
- deps += [
- #"../build/linux/system.gyp:udev", TODO(GYP)
- #"../device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_file_entry_proto", TODO(GYP)
- #"../device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_storage_info_proto", TODO(GYP)
- #"../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol", TODO(GYP)
- ]
+ configs += [ "//build/config/linux:udev" ]
+ deps += [ "//device/media_transfer_protocol" ]
}
if (is_linux && !is_chromeos) {
- deps += [
- # "../build/linux/system.gyp:libspeechd", TODO(GYP)
- ]
+ deps += [ "//build/config/linux:libspeechd" ]
}
if (is_chromeos) {
diff --git a/chrome/browser/net/BUILD.gn b/chrome/browser/net/BUILD.gn
new file mode 100644
index 0000000..6436bf9
--- /dev/null
+++ b/chrome/browser/net/BUILD.gn
@@ -0,0 +1,10 @@
+# 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")
+
+# GYP version: chrome/chrome_browser.gypi:probe_message_proto
+proto_library("probe_message_proto") {
+ sources = [ "probe_message.proto" ]
+}
diff --git a/chrome/browser/search/suggestions/proto/BUILD.gn b/chrome/browser/search/suggestions/proto/BUILD.gn
new file mode 100644
index 0000000..1a6018b
--- /dev/null
+++ b/chrome/browser/search/suggestions/proto/BUILD.gn
@@ -0,0 +1,9 @@
+# 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 = [ "suggestions.proto" ]
+}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index c631ae5..280aa1b 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3422,6 +3422,7 @@
},
{
# Protobuf compiler / generator for the suggestions service proto.
+ # GN version: //chrome/browser/search/suggestions/proto
'target_name': 'suggestions_proto',
'type': 'static_library',
'sources': [ 'browser/search/suggestions/proto/suggestions.proto', ],
@@ -3433,6 +3434,7 @@
},
{
# Protobuf compiler / generator for Probe Message.
+ # GN version: //chrome/browser/net:probe_message_proto
'target_name': 'probe_message_proto',
'type': 'static_library',
'sources': [ 'browser/net/probe_message.proto' ],
diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp
index 8be9db8..cf9f0da 100644
--- a/chrome/chrome_resources.gyp
+++ b/chrome/chrome_resources.gyp
@@ -277,6 +277,7 @@
'includes': [ '../build/grit_target.gypi' ],
},
{
+ # GN version: //chrome/app:make_generated_resources_map
'target_name': 'chrome_strings_map',
'type': 'none',
'dependencies': [ 'chrome_strings', ],
@@ -510,6 +511,7 @@
], # conditions
},
{
+ # GN version: //chrome/app/theme:chrome_unscaled_resources
'target_name': 'chrome_unscaled_resources',
'type': 'none',
'actions': [
diff --git a/components/BUILD.gn b/components/BUILD.gn
index 0df3e56..89ae388 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -9,6 +9,7 @@ group("all_components") {
deps = [
"//components/cloud_devices/common",
+ "//components/dom_distiller/core",
"//components/favicon_base",
"//components/json_schema",
"//components/language_usage_metrics",
@@ -20,7 +21,7 @@ group("all_components") {
"//components/query_parser",
"//components/resources:components_resources",
"//components/startup_metric_utils",
- "//components/strings:components_strings",
+ "//components/strings",
"//components/tracing",
"//components/translate:translate_core_browser",
"//components/translate:translate_core_common",
diff --git a/components/components_resources.gyp b/components/components_resources.gyp
index 376c9bb..135e84e 100644
--- a/components/components_resources.gyp
+++ b/components/components_resources.gyp
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/resources
'target_name': 'components_resources',
'type': 'none',
'variables': {
@@ -12,6 +13,7 @@
},
'actions': [
{
+ # GN version: //components/resources:components_resources
'action_name': 'generate_components_resources',
'variables': {
'grit_grd_file': 'resources/components_resources.grd',
@@ -19,6 +21,7 @@
'includes': [ '../build/grit_action.gypi' ],
},
{
+ # GN version: //components/resources:components_scaled_resources
'action_name': 'generate_components_scaled_resources',
'variables': {
'grit_grd_file': 'resources/components_scaled_resources.grd',
diff --git a/components/components_strings.gyp b/components/components_strings.gyp
index facf651..13d12ac 100644
--- a/components/components_strings.gyp
+++ b/components/components_strings.gyp
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/strings
'target_name': 'components_strings',
'type': 'none',
'variables': {
diff --git a/components/dom_distiller.gypi b/components/dom_distiller.gypi
index 80e1f4e..5f8c4bb 100644
--- a/components/dom_distiller.gypi
+++ b/components/dom_distiller.gypi
@@ -7,6 +7,7 @@
['android_webview_build == 0', {
'targets': [
{
+ # GN version: //components/dom_distiller/webui
'target_name': 'dom_distiller_webui',
'type': 'static_library',
'dependencies': [
@@ -30,6 +31,7 @@
],
},
{
+ # GN version: //components/dom_distiller/core
'target_name': 'dom_distiller_core',
'type': 'static_library',
'dependencies': [
@@ -95,6 +97,7 @@
],
},
{
+ # GN version: components/dom_distiller/core:test_support
'target_name': 'dom_distiller_test_support',
'type': 'static_library',
'dependencies': [
@@ -116,6 +119,7 @@
],
},
{
+ # GN version: //components/dom_distiller/core/proto
'target_name': 'distilled_page_proto',
'type': 'static_library',
'sources': [
@@ -133,6 +137,7 @@
['OS != "ios"', {
'targets': [
{
+ # GN version: //components/dom_distiller/content
'target_name': 'dom_distiller_content',
'type': 'static_library',
'dependencies': [
diff --git a/components/dom_distiller/content/BUILD.gn b/components/dom_distiller/content/BUILD.gn
new file mode 100644
index 0000000..b8ef83d
--- /dev/null
+++ b/components/dom_distiller/content/BUILD.gn
@@ -0,0 +1,27 @@
+# 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.
+
+if (!is_ios) {
+ # GYP version: components/dom_distiller.gypi:dom_distiller_content
+ static_library("content") {
+ sources = [
+ "distiller_page_web_contents.cc",
+ "distiller_page_web_contents.h",
+ "dom_distiller_viewer_source.cc",
+ "dom_distiller_viewer_source.h",
+ "web_contents_main_frame_observer.cc",
+ "web_contents_main_frame_observer.h",
+ ]
+
+ deps = [
+ "//components/dom_distiller/core",
+ "//components/resources",
+ "//components/strings",
+ "//content/public/browser",
+ "//net",
+ "//skia",
+ #'../sync/sync.gyp:sync', TODO(GYP)
+ ]
+ }
+}
diff --git a/components/dom_distiller/core/BUILD.gn b/components/dom_distiller/core/BUILD.gn
new file mode 100644
index 0000000..38ce4fc
--- /dev/null
+++ b/components/dom_distiller/core/BUILD.gn
@@ -0,0 +1,79 @@
+# 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.
+
+# GYP version: components/dom_distiller.gypi:dom_distiller_core
+static_library("core") {
+ sources = [
+ "../android/component_jni_registrar.cc",
+ "../android/component_jni_registrar.h",
+ "article_distillation_update.cc",
+ "article_distillation_update.h",
+ "article_entry.cc",
+ "article_entry.h",
+ "distilled_content_store.cc",
+ "distilled_content_store.h",
+ "distiller.cc",
+ "distiller.h",
+ "distiller_page.cc",
+ "distiller_page.h",
+ "distiller_url_fetcher.cc",
+ "distiller_url_fetcher.h",
+ "dom_distiller_constants.cc",
+ "dom_distiller_constants.h",
+ "dom_distiller_model.cc",
+ "dom_distiller_model.h",
+ "dom_distiller_observer.h",
+ "dom_distiller_service.cc",
+ "dom_distiller_service.h",
+ "dom_distiller_store.cc",
+ "dom_distiller_store.h",
+ "feedback_reporter.cc",
+ "feedback_reporter.h",
+ "task_tracker.cc",
+ "task_tracker.h",
+ "url_constants.cc",
+ "url_constants.h",
+ "url_utils_android.cc",
+ "url_utils_android.h",
+ "url_utils.cc",
+ "url_utils.h",
+ "viewer.cc",
+ "viewer.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/dom_distiller/core/proto",
+ "//components/resources",
+ "//components/strings",
+ "//skia",
+ "//sync",
+ "//third_party/dom_distiller_js/package/proto",
+ #'components.gyp:leveldb_proto', TODO(GYP)
+ ]
+
+ if (is_android) {
+ #deps += [ ":dom_distiller_core_jni_headers" ] TODO(GYP)
+ }
+}
+
+# GYP version: components/dom_distiller.gypi:dom_distiller_test_support
+static_library("test_support") {
+ sources = [
+ "dom_distiller_test_util.cc",
+ "dom_distiller_test_util.h",
+ "fake_distiller.cc",
+ "fake_distiller.h",
+ "fake_distiller_page.cc",
+ "fake_distiller_page.h",
+ ]
+
+ deps = [
+ ":core",
+ #'components.gyp:leveldb_proto_test_support', TODO(GYP)
+ "//sync",
+ "//testing/gmock",
+ ]
+}
+
diff --git a/components/dom_distiller/core/proto/BUILD.gn b/components/dom_distiller/core/proto/BUILD.gn
new file mode 100644
index 0000000..a061eaf
--- /dev/null
+++ b/components/dom_distiller/core/proto/BUILD.gn
@@ -0,0 +1,13 @@
+# 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")
+
+# GYP version: components/dom_distiller.gypi:distilled_page_proto
+proto_library("proto") {
+ sources = [
+ "distilled_article.proto",
+ "distilled_page.proto",
+ ]
+}
diff --git a/components/dom_distiller/webui/BUILD.gn b/components/dom_distiller/webui/BUILD.gn
new file mode 100644
index 0000000..2272840
--- /dev/null
+++ b/components/dom_distiller/webui/BUILD.gn
@@ -0,0 +1,24 @@
+# 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.
+
+# GYP version: components/dom_distiller.gyp:dom_distiller_webui
+static_library("webui") {
+ sources = [
+ "dom_distiller_handler.cc",
+ "dom_distiller_handler.h",
+ "dom_distiller_ui.cc",
+ "dom_distiller_ui.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/dom_distiller/core",
+ "//components/dom_distiller/core/proto",
+ "//components/resources",
+ "//components/strings",
+ "//content/public/browser",
+ "//skia",
+ #'../sync/sync.gyp:sync', TODO(GYP)
+ ]
+}
diff --git a/components/policy.gypi b/components/policy.gypi
index d99f7af..b5dc32c 100644
--- a/components/policy.gypi
+++ b/components/policy.gypi
@@ -198,6 +198,7 @@
],
},
{
+ # GN version: //components/policy/proto
'target_name': 'cloud_policy_proto',
'type': '<(component)',
'sources': [
diff --git a/components/policy/proto/BUILD.gn b/components/policy/proto/BUILD.gn
new file mode 100644
index 0000000..13b7e2f
--- /dev/null
+++ b/components/policy/proto/BUILD.gn
@@ -0,0 +1,22 @@
+# 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 = [
+ "device_management_backend.proto",
+ "policy_signing_key.proto",
+ ]
+ if (!is_android && !is_ios) {
+ sources += [ "chrome_extension_policy.proto" ]
+ }
+ if (is_chromeos) {
+ sources += [ "device_management_local.proto" ]
+ }
+
+ cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:"
+ cc_include = "components/policy/policy_proto_export.h"
+ defines = [ "POLICY_PROTO_COMPILATION" ]
+}
diff --git a/components/resources/BUILD.gn b/components/resources/BUILD.gn
index 2208865..5c27e28 100644
--- a/components/resources/BUILD.gn
+++ b/components/resources/BUILD.gn
@@ -4,6 +4,22 @@
import("//tools/grit/grit_rule.gni")
+# GYP version: components/components_resources.gyp:components_resources
+group("resources") {
+ deps = [
+ ":components_resources",
+ ":components_scaled_resources",
+ ]
+}
+
+# GYP version: components/components_resources.gyp
+# (generate_components_resources action)
grit("components_resources") {
source = "components_resources.grd"
}
+
+# GYP version: components/components_resources.gyp
+# (generate_scaled_components_resources action)
+grit("components_scaled_resources") {
+ source = "components_scaled_resources.grd"
+}
diff --git a/components/strings/BUILD.gn b/components/strings/BUILD.gn
index 192b4f1..e6287a5 100644
--- a/components/strings/BUILD.gn
+++ b/components/strings/BUILD.gn
@@ -4,6 +4,7 @@
import("//tools/grit/grit_rule.gni")
-grit("components_strings") {
+# GYP version: components/components_strings.gyp:components_strings
+grit("strings") {
source = "../components_strings.grd"
}
diff --git a/device/media_transfer_protocol/BUILD.gn b/device/media_transfer_protocol/BUILD.gn
new file mode 100644
index 0000000..0e2ff84
--- /dev/null
+++ b/device/media_transfer_protocol/BUILD.gn
@@ -0,0 +1,37 @@
+# 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")
+
+# GYP version: device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_file_entry_proto
+proto_library("mtp_file_entry_proto") {
+ sources = [ "//third_party/cros_system_api/dbus/mtp_file_entry.proto" ]
+ proto_in_dir = "//third_party/cros_system_api/dbus"
+ proto_out_dir = "device/media_transfer_protocol"
+}
+
+# GYP version: device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_storage_info_proto
+proto_library("mtp_storage_info_proto") {
+ sources = [ "//third_party/cros_system_api/dbus/mtp_storage_info.proto" ]
+ proto_in_dir = "//third_party/cros_system_api/dbus"
+ proto_out_dir = "device/media_transfer_protocol"
+}
+
+# GYP version: device/media_transfer_protocol:media_transfer_protocol.gyp:media_transfer_protocol
+static_library("media_transfer_protocol") {
+ sources = [
+ "media_transfer_protocol_daemon_client.cc",
+ "media_transfer_protocol_daemon_client.h",
+ "media_transfer_protocol_manager.cc",
+ "media_transfer_protocol_manager.h",
+ ]
+
+ configs += [ "//build/config/linux:dbus" ]
+
+ deps = [
+ ":mtp_file_entry_proto",
+ ":mtp_storage_info_proto",
+ ]
+ forward_dependent_configs_from = deps
+}
diff --git a/device/media_transfer_protocol/media_transfer_protocol.gyp b/device/media_transfer_protocol/media_transfer_protocol.gyp
index 469a9e5..05c55b9 100644
--- a/device/media_transfer_protocol/media_transfer_protocol.gyp
+++ b/device/media_transfer_protocol/media_transfer_protocol.gyp
@@ -10,6 +10,7 @@
{
# Protobuf compiler / generator for the MtpFileEntry and
# MtpFileEntries protocol buffers.
+ # GN version: //device/media_transfer_protocol:mtp_file_entry_proto
'target_name': 'mtp_file_entry_proto',
'type': 'static_library',
'sources': [
@@ -24,6 +25,7 @@
{
# Protobuf compiler / generator for the MtpStorageInfo protocol
# buffer.
+ # GN version: //device/media_transfer_protocol:mtp_storage_info_proto
'target_name': 'mtp_storage_info_proto',
'type': 'static_library',
'sources': [
@@ -36,6 +38,7 @@
'includes': ['../../build/protoc.gypi'],
},
{
+ # GN version: //device/media_transfer_protocol
'target_name': 'device_media_transfer_protocol',
'type': 'static_library',
'dependencies': [
diff --git a/third_party/dom_distiller_js/dom_distiller_js.gyp b/third_party/dom_distiller_js/dom_distiller_js.gyp
index aaa96ed..2a65c3f 100644
--- a/third_party/dom_distiller_js/dom_distiller_js.gyp
+++ b/third_party/dom_distiller_js/dom_distiller_js.gyp
@@ -4,6 +4,7 @@
{
'targets': [
{
+ # GN version: //third_party/dom_distiller_js:proto
'target_name': 'dom_distiller_js_proto',
'type': 'static_library',
'sources': [ 'package/proto/dom_distiller.proto', ],
diff --git a/third_party/dom_distiller_js/package/proto/BUILD.gn b/third_party/dom_distiller_js/package/proto/BUILD.gn
new file mode 100644
index 0000000..4b6a53b
--- /dev/null
+++ b/third_party/dom_distiller_js/package/proto/BUILD.gn
@@ -0,0 +1,21 @@
+# 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")
+
+config("dependent_config") {
+ include_dirs = [ "//third_party/dom_distiller_js/package/proto_gen" ]
+}
+
+source_set("proto") {
+ deps = [ ":dom_distiller_proto" ]
+ direct_dependent_configs = [ ":dependent_config" ]
+ forward_dependent_configs_from = [ ":dom_distiller_proto" ]
+}
+
+proto_library("dom_distiller_proto") {
+ visibility = ":*"
+ sources = [ "dom_distiller.proto" ]
+ proto_out_dir = "third_party/dom_distiller_js"
+}
diff --git a/third_party/libaddressinput/BUILD.gn b/third_party/libaddressinput/BUILD.gn
new file mode 100644
index 0000000..f00fbbc
--- /dev/null
+++ b/third_party/libaddressinput/BUILD.gn
@@ -0,0 +1,162 @@
+# 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")
+
+# TODO(rouslan): Use the src/ directory. http://crbug.com/327046
+libaddressinput_dir = "chromium"
+
+# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_strings
+grit("strings") {
+ source = "$libaddressinput_dir/cpp/res/libaddressinput_strings.grd"
+}
+
+# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_updated_strings
+grit("updated_strings") {
+ source = "//chrome/app/address_input_strings.grd"
+}
+
+config("libaddressinput_config") {
+ defines = [
+ "CUSTOM_BASICTYPES=\"base/basictypes.h\"",
+ "CUSTOM_SCOPED_PTR=\"base/memory/scoped_ptr.h\"",
+ ]
+ include_dirs = [ "$libaddressinput_dir/cpp/include" ]
+}
+
+# This target provides basic functionality which is cooked into the build.
+# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_util
+static_library("util") {
+ sources = [
+ "chromium/canonicalize_string.cc",
+ "chromium/json.cc",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_data.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_field.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/basictypes.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/basictypes.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/move.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/scoped_ptr.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/template_util.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/util/scoped_ptr.h",
+ "$libaddressinput_dir/cpp/src/address_data.cc",
+ "$libaddressinput_dir/cpp/src/address_field.cc",
+ "$libaddressinput_dir/cpp/src/region_data_constants.cc",
+ "$libaddressinput_dir/cpp/src/region_data_constants.h",
+ "$libaddressinput_dir/cpp/src/rule.cc",
+ "$libaddressinput_dir/cpp/src/rule.h",
+ "$libaddressinput_dir/cpp/src/util/canonicalize_string.h",
+ "$libaddressinput_dir/cpp/src/util/json.h",
+ "$libaddressinput_dir/cpp/src/util/stl_util.h",
+ "$libaddressinput_dir/cpp/src/util/string_util.cc",
+ "$libaddressinput_dir/cpp/src/util/string_util.h",
+ ]
+
+ direct_dependent_configs = [ ":libaddressinput_config" ]
+ include_dirs = [ "$root_gen_dir/libaddressinput" ]
+
+ deps = [
+ "//base",
+ "//base:i18n",
+ "//third_party/icu",
+ "//third_party/re2",
+ ]
+}
+
+# This target provides more complicated functionality like pinging servers
+# for validation rules.
+# GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput
+static_library("libaddressinput") {
+ sources = [
+ "chromium/chrome_downloader_impl.cc",
+ "chromium/chrome_downloader_impl.h",
+ "chromium/chrome_storage_impl.cc",
+ "chromium/chrome_storage_impl.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_problem.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_ui_component.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_ui.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/address_validator.h",
+ "$libaddressinput_dir/cpp/include/libaddressinput/load_rules_delegate.h",
+ "$libaddressinput_dir/cpp/src/address_problem.cc",
+ "$libaddressinput_dir/cpp/src/address_ui.cc",
+ "$libaddressinput_dir/cpp/src/address_validator.cc",
+ "$libaddressinput_dir/cpp/src/country_rules_aggregator.cc",
+ "$libaddressinput_dir/cpp/src/country_rules_aggregator.h",
+ "$libaddressinput_dir/cpp/src/fallback_data_store.cc",
+ "$libaddressinput_dir/cpp/src/fallback_data_store.h",
+ "$libaddressinput_dir/cpp/src/grit.h",
+ "$libaddressinput_dir/cpp/src/retriever.cc",
+ "$libaddressinput_dir/cpp/src/retriever.h",
+ "$libaddressinput_dir/cpp/src/ruleset.cc",
+ "$libaddressinput_dir/cpp/src/ruleset.h",
+ "$libaddressinput_dir/cpp/src/util/md5.cc",
+ "$libaddressinput_dir/cpp/src/util/md5.h",
+ "$libaddressinput_dir/cpp/src/util/trie.cc",
+ "$libaddressinput_dir/cpp/src/util/trie.h",
+ ]
+
+ direct_dependent_configs = [ ":libaddressinput_config" ]
+
+ defines = [
+ "VALIDATION_DATA_URL=\"https://i18napis.appspot.com/ssl-aggregate-address/\"",
+ ]
+
+ deps = [
+ ":strings",
+ ":updated_strings",
+ ":util",
+ "//base",
+ "//base:i18n",
+ "//third_party/icu",
+ "//third_party/re2",
+ ]
+}
+
+test("libaddressinput_unittests") {
+ sources = [
+ "chromium/chrome_downloader_impl_unittest.cc",
+ "chromium/chrome_rule_test.cc",
+ "chromium/chrome_storage_impl_unittest.cc",
+ "$libaddressinput_dir/cpp/test/address_data_test.cc",
+ "$libaddressinput_dir/cpp/test/address_ui_test.cc",
+ "$libaddressinput_dir/cpp/test/address_validator_test.cc",
+ "$libaddressinput_dir/cpp/test/country_rules_aggregator_test.cc",
+ "$libaddressinput_dir/cpp/test/countryinfo_example_addresses_test.cc",
+ "$libaddressinput_dir/cpp/test/fake_downloader.cc",
+ "$libaddressinput_dir/cpp/test/fake_downloader.h",
+ "$libaddressinput_dir/cpp/test/fake_downloader_test.cc",
+ "$libaddressinput_dir/cpp/test/fake_storage.cc",
+ "$libaddressinput_dir/cpp/test/fake_storage.h",
+ "$libaddressinput_dir/cpp/test/fake_storage_test.cc",
+ "$libaddressinput_dir/cpp/test/fallback_data_store_test.cc",
+ "$libaddressinput_dir/cpp/test/region_data_constants_test.cc",
+ "$libaddressinput_dir/cpp/test/retriever_test.cc",
+ "$libaddressinput_dir/cpp/test/rule_test.cc",
+ "$libaddressinput_dir/cpp/test/storage_test_runner.cc",
+ "$libaddressinput_dir/cpp/test/storage_test_runner.h",
+ "$libaddressinput_dir/cpp/test/util/json_test.cc",
+ "$libaddressinput_dir/cpp/test/util/md5_unittest.cc",
+ "$libaddressinput_dir/cpp/test/util/scoped_ptr_unittest.cc",
+ "$libaddressinput_dir/cpp/test/util/stl_util_unittest.cc",
+ "$libaddressinput_dir/cpp/test/util/string_util_test.cc",
+ "$libaddressinput_dir/cpp/test/util/trie_test.cc",
+ ]
+
+ defines = [
+ "TEST_DATA_DIR=\"third_party/libaddressinput/src/testdata\"",
+ ]
+
+ include_dirs = [
+ "$libaddressinput_dir/cpp/src",
+ #"'<(SHARED_INTERMEDIATE_DIR)/libaddressinput/',
+ ]
+
+ deps = [
+ ":libaddressinput",
+ ":strings",
+ "//base:prefs",
+ "//base/test:run_all_unittests",
+ "//net:test_support",
+ "//testing/gtest",
+ ]
+}
diff --git a/third_party/libaddressinput/libaddressinput.gyp b/third_party/libaddressinput/libaddressinput.gyp
index fc3fb93..bc6e447 100644
--- a/third_party/libaddressinput/libaddressinput.gyp
+++ b/third_party/libaddressinput/libaddressinput.gyp
@@ -21,6 +21,7 @@
},
'targets': [
{
+ # GN version: //third_party/libaddressinput:strings
'target_name': 'libaddressinput_strings',
'type': 'none',
'variables': {
@@ -42,6 +43,7 @@
],
},
{
+ # GN version: //third_party/libaddressinput:updated_strings
'target_name': 'libaddressinput_updated_strings',
'type': 'none',
'variables': {
@@ -63,7 +65,9 @@
],
},
# This target provides basic functionality which is cooked into the build.
- { 'target_name': 'libaddressinput_util',
+ {
+ # GN version: //third_party/libaddressinput:util
+ 'target_name': 'libaddressinput_util',
'type': 'static_library',
'include_dirs': [
'<(libaddressinput_dir)/cpp/include/',
@@ -112,6 +116,7 @@
# This target provides more complicated functionality like pinging servers
# for validation rules.
{
+ # GN version: //third_party/libaddressinput
'target_name': 'libaddressinput',
'type': 'static_library',
'include_dirs': [
@@ -169,6 +174,7 @@
},
},
{
+ # GN version: //third_party/libaddressinput:libaddressinput_unittests
'target_name': 'libaddressinput_unittests',
'type': '<(gtest_target_type)',
'include_dirs': [
diff --git a/tools/generate_library_loader/generate_library_loader.gni b/tools/generate_library_loader/generate_library_loader.gni
new file mode 100644
index 0000000..5246aef
--- /dev/null
+++ b/tools/generate_library_loader/generate_library_loader.gni
@@ -0,0 +1,54 @@
+# 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.
+
+# This template makes a stub for a Linux system library that dynamically loads
+# it at runtime.
+
+# name: Name to use for the value of the --name arg.
+# output_h/output_cc: Names for the generated header/cc file with no dir.
+# header: header file to process. Example: "<foo/bar.h>"
+# functions: List of strings for functions to process.
+# config: (optional) Label of the config generated by pkgconfig.
+# bundled_header: (optional)
+template("generate_library_loader") {
+ output_h = "$root_gen_dir/library_loaders/" + invoker.output_h
+ output_cc = "$root_gen_dir/library_loaders/" + invoker.output_cc
+
+ action_visibility = ":$target_name"
+ action("${target_name}_loader") {
+ visibility = action_visibility
+
+ script = "//tools/generate_library_loader/generate_library_loader.py"
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ outputs = [ output_h, output_cc ]
+
+ args = [
+ "--name", invoker.name,
+ "--output-h", rebase_path(output_h),
+ "--output-cc", rebase_path(output_cc),
+ "--header", invoker.header,
+ # Note GYP build exposes a per-target variable to control this, which, if
+ # manually set to true, will disable dlopen(). Its not clear this is
+ # needed, so here we just leave off. If this can be done globally, we can
+ # expose one switch for this value, otherwise we need to add a template
+ # param for this.
+ "--link-directly=0",
+ ]
+ if (defined(invoker.bundled_header)) {
+ args += [ "--bundled-header", invoker.bundled_header ]
+ }
+ args += invoker.functions
+ }
+
+ source_set(target_name) {
+ if (defined(invoker.config)) {
+ direct_dependent_configs = [ invoker.config ]
+ }
+ sources = [ output_h, output_cc ]
+ deps = [ ":${target_name}_loader" ]
+ }
+}