summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 22:00:37 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 22:00:37 +0000
commitb9f4c684a708d9d7e2f8076beb77b3382ae75667 (patch)
tree356760b8dc54a50c46d8af2fbc0414138331164a
parent2501ca5dbd5f1a495b306937c7fed7c32698c943 (diff)
downloadchromium_src-b9f4c684a708d9d7e2f8076beb77b3382ae75667.zip
chromium_src-b9f4c684a708d9d7e2f8076beb77b3382ae75667.tar.gz
chromium_src-b9f4c684a708d9d7e2f8076beb77b3382ae75667.tar.bz2
Add components and CLD to GN build.
New components: - rappor - data_reduction_proxy - captive_portal - translate - usb_service - web_modal Removes the _IMPLEMENTATION define for web_modal. It is unused (it is a static library, not a component). Adds third_party/cld and third_party/cld_2 BUILD files. Separates out the include dir setting of "//" and the root gen directory so. cld_2 needed to not have this due to base file name conflicts. R=jamesr@chromium.org Review URL: https://codereview.chromium.org/382663002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282438 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--BUILD.gn3
-rw-r--r--build/config/BUILDCONFIG.gn1
-rw-r--r--build/config/compiler/BUILD.gn15
-rw-r--r--chrome/browser/BUILD.gn24
-rw-r--r--chrome/common/BUILD.gn30
-rw-r--r--chrome/renderer/BUILD.gn24
-rw-r--r--components/BUILD.gn26
-rw-r--r--components/autocomplete.gypi4
-rw-r--r--components/autocomplete/BUILD.gn34
-rw-r--r--components/captive_portal.gypi4
-rw-r--r--components/captive_portal/BUILD.gn35
-rw-r--r--components/data_reduction_proxy.gypi6
-rw-r--r--components/data_reduction_proxy/browser/BUILD.gn52
-rw-r--r--components/data_reduction_proxy/common/BUILD.gn18
-rw-r--r--components/dom_distiller/content/BUILD.gn6
-rw-r--r--components/rappor.gypi2
-rw-r--r--components/rappor/BUILD.gn32
-rw-r--r--components/rappor/proto/BUILD.gn11
-rw-r--r--components/translate.gypi12
-rw-r--r--components/translate/BUILD.gn72
-rw-r--r--components/translate/content/browser/BUILD.gn31
-rw-r--r--components/translate/content/common/BUILD.gn27
-rw-r--r--components/translate/content/renderer/BUILD.gn33
-rw-r--r--components/translate/core/browser/BUILD.gn42
-rw-r--r--components/translate/core/common/BUILD.gn26
-rw-r--r--components/translate/core/language_detection/BUILD.gn25
-rw-r--r--components/usb_service.gypi2
-rw-r--r--components/usb_service/BUILD.gn37
-rw-r--r--components/web_modal.gypi7
-rw-r--r--components/web_modal/BUILD.gn37
-rw-r--r--third_party/cld/BUILD.gn111
-rw-r--r--third_party/cld_2/BUILD.gn147
-rw-r--r--third_party/cld_2/cld_2.gyp4
33 files changed, 819 insertions, 121 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 6357f87..123e929a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -53,6 +53,8 @@ group("root") {
"//third_party/angle:translator",
"//third_party/brotli",
"//third_party/cacheinvalidation",
+ "//third_party/cld",
+ "//third_party/cld_2",
"//third_party/ffmpeg",
"//third_party/flac",
"//third_party/harfbuzz-ng",
@@ -167,6 +169,7 @@ group("root") {
"//third_party/WebKit/public:all_blink",
# Not tested on Android yet:
+ "//third_party/cld_2",
"//third_party/libaddressinput",
"//third_party/ffmpeg",
"//ui/web_dialogs",
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 3df338d..e8a9a22 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -318,6 +318,7 @@ _native_compiler_configs = [
"//build/config/compiler:compiler",
"//build/config/compiler:chromium_code",
+ "//build/config/compiler:default_include_dirs",
"//build/config/compiler:default_warnings",
"//build/config/compiler:no_rtti",
"//build/config/compiler:runtime_library",
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index aa66b89..114ce1b 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -16,6 +16,18 @@ declare_args() {
android_full_debug = false
}
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+ include_dirs = [
+ "//",
+ root_gen_dir,
+ ]
+}
+
# compiler ---------------------------------------------------------------------
#
# Base compiler configuration.
@@ -29,9 +41,6 @@ config("compiler") {
cflags_cc = []
ldflags = []
defines = []
- include_dirs = []
-
- include_dirs += [ "//", root_gen_dir ]
# In general, Windows is totally different, but all the other builds share
# some common GCC configuration. This section sets up Windows and the common
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 321be2eb..1ef4b87 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -40,8 +40,11 @@ static_library("browser") {
"//chrome/browser/search/suggestions/proto",
"//chrome/common",
"//chrome/common/net",
+ "//components/autocomplete",
"//components/autofill/core/browser",
+ "//components/captive_portal",
"//components/cloud_devices/common",
+ "//components/data_reduction_proxy/browser",
"//components/domain_reliability",
"//components/favicon_base",
"//components/favicon/core",
@@ -52,9 +55,10 @@ static_library("browser") {
"//components/os_crypt",
"//components/policy:policy_component",
"//components/query_parser",
+ "//components/rappor",
"//components/strings",
- "//components/translate:translate_core_browser",
- "//components/translate:translate_core_common",
+ "//components/translate/core/browser",
+ "//components/translate/core/common",
"//components/url_fixer",
"//components/user_prefs",
"//content/public/browser",
@@ -80,10 +84,7 @@ static_library("browser") {
"//ui/resources",
# TODO(GYP)
#"browser_ui",
- #"../components/components.gyp:autocomplete",
#"../components/components.gyp:bookmarks_browser",
- #"../components/components.gyp:captive_portal",
- #"../components/components.gyp:data_reduction_proxy_browser",
#"../components/components.gyp:feedback_component",
#"../components/components.gyp:gcm_driver",
#"../components/components.gyp:google_core_browser",
@@ -94,7 +95,6 @@ static_library("browser") {
#"../components/components.gyp:password_manager_core_browser",
#"../components/components.gyp:password_manager_core_common",
#"../components/components.gyp:precache_core",
- #"../components/components.gyp:rappor",
#"../components/components.gyp:search_engines",
#"../components/components.gyp:search_provider_logos",
#"../components/components.gyp:signin_core_browser",
@@ -108,7 +108,7 @@ static_library("browser") {
]
forward_dependent_configs_from = [
- #"../components/components.gyp:autofill_core_browser", TODO(GYP)
+ "//components/autofill/core/browser",
"//content/public/browser",
"//sql",
"//sync",
@@ -139,10 +139,15 @@ static_library("browser") {
"//chrome/browser/sync_file_system:sync_file_system_proto",
"//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
"//chrome/common/extensions/api:api",
+ "//components/autofill/content/browser",
+ "//components/dom_distiller/content",
"//components/keyed_service/content",
+ "//components/translate/content/browser",
"//components/url_matcher",
+ "//components/usb_service",
"//components/visitedlink/browser",
"//components/visitedlink/common",
+ "//components/web_modal",
"//mojo/environment:chromium",
"//mojo/public/cpp/bindings",
"//mojo/public/js/bindings",
@@ -169,16 +174,11 @@ static_library("browser") {
#"browser_extensions",
#"debugger",
#"installer_util",
- #"../components/components.gyp:autofill_content_browser",
- #"../components/components.gyp:dom_distiller_content",
#"../components/components.gyp:navigation_interception",
#"../components/components.gyp:password_manager_content_browser",
#"../components/components.gyp:precache_content",
#"../components/components.gyp:sessions",
#"../components/components.gyp:storage_monitor",
- #"../components/components.gyp:translate_content_browser",
- #"../components/components.gyp:usb_service",
- #"../components/components.gyp:web_modal",
#"../media/cast/cast.gyp:cast_transport",
#"../media/media.gyp:media",
## TODO(tonyg): Remove this dependency (crbug.com/280157).
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 6712b50..49e7552 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -31,7 +31,6 @@ static_library("common") {
deps = [
":version",
- #":installer_util", TODO(GYP)
"//base:base",
"//base:i18n",
"//base:prefs",
@@ -42,17 +41,15 @@ static_library("common") {
"//chrome/common:constants",
"//chrome/common/net",
"//chrome/common/safe_browsing:proto",
- #"//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/cloud_devices/common",
+ "//components/metrics",
+ "//components/policy:policy_component_common",
+ "//components/translate/core/common",
"//components/variations",
"//content/public/common",
"//crypto",
"//extensions:extensions_resources",
"//extensions/strings",
- #"//media/cast/cast.gyp:cast_transport", TODO(GYP)
"//net",
"//skia",
"//third_party/icu",
@@ -61,24 +58,27 @@ static_library("common") {
"//third_party/zlib:zip",
"//ui/resources:resources",
"//url",
+ #":installer_util", TODO(GYP)
+ #"//components/json_schema", TODO(GYP)
+ #"//media/cast/cast.gyp:cast_transport", TODO(GYP)
]
if (!is_ios) {
deps += [
"//chrome/common/extensions/api",
- #'<(DEPTH)/components/components.gyp:autofill_core_common', TODO(GYP)
- #'<(DEPTH)/components/components.gyp:autofill_content_common', TODO(GYP)
- #'<(DEPTH)/components/components.gyp:password_manager_core_common', TODO(GYP)
- #'<(DEPTH)/components/components.gyp:signin_core_common', TODO(GYP)
- #'<(DEPTH)/components/components.gyp:translate_content_common', TODO(GYP)
- #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
"//components/visitedlink/common",
- #'<(DEPTH)/extensions/common/api/api.gyp:extensions_api', TODO(GYP)
- #'<(DEPTH)/extensions/extensions.gyp:extensions_common', TODO(GYP)
+ "//components/autofill/content/common",
+ "//components/autofill/core/common",
+ "//components/translate/content/common",
"//ipc",
"//third_party/adobe/flash:flapper_version_h",
"//third_party/re2",
"//third_party/widevine/cdm:version_h",
+ #'<(DEPTH)/components/components.gyp:password_manager_core_common', TODO(GYP)
+ #'<(DEPTH)/components/components.gyp:signin_core_common', TODO(GYP)
+ #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
+ #'<(DEPTH)/extensions/common/api/api.gyp:extensions_api', TODO(GYP)
+ #'<(DEPTH)/extensions/extensions.gyp:extensions_common', TODO(GYP)
]
}
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
index d1ab7f1..51bf2ea 100644
--- a/chrome/renderer/BUILD.gn
+++ b/chrome/renderer/BUILD.gn
@@ -28,21 +28,14 @@ static_library("renderer") {
"//chrome/common/net",
"//chrome:resources",
"//chrome:strings",
- "//third_party/re2",
- #"../components/components.gyp:autofill_content_renderer", TODO(GYP)
- #"../components/components.gyp:cdm_renderer", TODO(GYP)
- #"../components/components.gyp:data_reduction_proxy_common", TODO(GYP)
- #"../components/components.gyp:startup_metric_utils", TODO(GYP)
- #"../components/components.gyp:plugins_renderer", TODO(GYP)
- "//components/translate:translate_core_common",
- #"../components/components.gyp:translate_core_language_detection", TODO(GYP)
+ "//components/autofill/content/renderer",
+ "//components/data_reduction_proxy/common",
+ "//components/translate/core/common",
+ "//components/translate/core/language_detection",
"//components/visitedlink/renderer",
"//content/public/renderer",
- #"../extensions/extensions.gyp:extensions_renderer", TODO(GYP)
- #"../extensions/extensions_resources.gyp:extensions_resources", TODO(GYP)
"//media/cast/logging/proto",
- #"../media/cast/cast.gyp:cast_sender", TODO(GYP)
- #"../media/cast/cast.gyp:cast_transport", TODO(GYP)
+ "//third_party/re2",
"//net",
"//skia",
"//third_party/WebKit/public:blink",
@@ -54,6 +47,13 @@ static_library("renderer") {
"//webkit/child",
"//webkit/common",
"//webkit:resources",
+ #"../components/components.gyp:cdm_renderer", TODO(GYP)
+ #"../components/components.gyp:startup_metric_utils", TODO(GYP)
+ #"../components/components.gyp:plugins_renderer", TODO(GYP)
+ #"../extensions/extensions.gyp:extensions_renderer", TODO(GYP)
+ #"../extensions/extensions_resources.gyp:extensions_resources", TODO(GYP)
+ #"../media/cast/cast.gyp:cast_sender", TODO(GYP)
+ #"../media/cast/cast.gyp:cast_transport", TODO(GYP)
]
if (enable_nacl) {
diff --git a/components/BUILD.gn b/components/BUILD.gn
index 56ae457..0f11fcc 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -8,10 +8,14 @@ group("all_components") {
visibility = "//:*" # Only for the root targets to bring in.
deps = [
+ "//components/autocomplete",
"//components/autofill/content/browser",
"//components/autofill/content/common",
"//components/autofill/content/renderer",
+ "//components/captive_portal",
"//components/cloud_devices/common",
+ "//components/data_reduction_proxy/browser",
+ "//components/data_reduction_proxy/common",
"//components/dom_distiller/core",
"//components/domain_reliability",
"//components/favicon_base",
@@ -28,19 +32,25 @@ group("all_components") {
"//components/policy",
"//components/pref_registry",
"//components/query_parser",
+ "//components/rappor",
"//components/resources:components_resources",
"//components/startup_metric_utils",
"//components/strings",
"//components/tracing",
- "//components/translate:translate_core_browser",
- "//components/translate:translate_core_common",
+ "//components/translate/content/browser",
+ "//components/translate/content/common",
+ "//components/translate/content/renderer",
+ "//components/translate/core/browser",
+ "//components/translate/core/common",
"//components/url_fixer",
"//components/url_matcher",
+ "//components/usb_service",
"//components/user_prefs",
"//components/variations",
"//components/visitedlink/browser",
"//components/visitedlink/common",
- "//components/visitedlink/renderer", # Blocked on blink
+ "//components/visitedlink/renderer",
+ "//components/web_modal",
]
if (is_win || is_mac) {
@@ -55,10 +65,14 @@ group("all_components") {
if (is_android) {
deps -= [
+ "//components/autocomplete", # Should work, needs checking.
"//components/autofill/content/browser", # Blocked on content/blink.
"//components/autofill/content/common", # Blocked on content.
"//components/autofill/content/renderer", # Blocked on content/blink.
+ "//components/captive_portal", # Should work, needs checking.
"//components/cloud_devices/common", # Should work, needs checking.
+ "//components/data_reduction_proxy/browser", # Should work, needs checking.
+ "//components/data_reduction_proxy/common", # Should work, needs checking.
"//components/dom_distiller/core", # Blocked on content.
"//components/domain_reliability", # Blocked on content.
"//components/favicon_base", # Should work, needs checking.
@@ -69,10 +83,16 @@ group("all_components") {
"//components/json_schema", # Should work, needs checking.
"//components/keyed_service/content", # Blocked on content.
"//components/policy", # Blocked on content (indirectly via autofill).
+ "//components/rappor", # Should work, needs checking.
+ "//components/translate/content/browser", # Blocked on content.
+ "//components/translate/content/common", # Blocked on content.
+ "//components/translate/content/renderer", # Blocked on content.
+ "//components/usb_service", # Blocked on content.
"//components/user_prefs", # Blocked on content.
"//components/visitedlink/browser", # Blocked on content.
"//components/visitedlink/common", # Blocked on content.
"//components/visitedlink/renderer", # Blocked on blink
+ "//components/web_modal", # Blocked on content.
]
}
}
diff --git a/components/autocomplete.gypi b/components/autocomplete.gypi
index 59f95ed..e20a379 100644
--- a/components/autocomplete.gypi
+++ b/components/autocomplete.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/autocomplete
'target_name': 'autocomplete',
'type': 'static_library',
'dependencies': [
@@ -18,6 +19,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'autocomplete/autocomplete_input.cc',
'autocomplete/autocomplete_input.h',
'autocomplete/autocomplete_match_type.cc',
@@ -28,6 +30,7 @@
],
},
{
+ # GN version: //components/autocomplete:test_support
'target_name': 'autocomplete_test_support',
'type': 'static_library',
'dependencies': [
@@ -39,6 +42,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'autocomplete/test_scheme_classifier.cc',
'autocomplete/test_scheme_classifier.h',
],
diff --git a/components/autocomplete/BUILD.gn b/components/autocomplete/BUILD.gn
new file mode 100644
index 0000000..8341faf
--- /dev/null
+++ b/components/autocomplete/BUILD.gn
@@ -0,0 +1,34 @@
+# 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("autocomplete") {
+ sources = [
+ "autocomplete_input.cc",
+ "autocomplete_input.h",
+ "autocomplete_scheme_classifier.h",
+ "url_prefix.cc",
+ "url_prefix.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/metrics/proto",
+ "//components/url_fixer",
+ "//net",
+ "//url",
+ ]
+}
+
+static_library("test_support") {
+ sources = [
+ "test_scheme_classifier.cc",
+ "test_scheme_classifier.h",
+ ]
+
+ deps = [
+ ":autocomplete",
+ "//base",
+ "//components/metrics/proto",
+ ]
+}
diff --git a/components/captive_portal.gypi b/components/captive_portal.gypi
index 91418e3..c4b6fd9 100644
--- a/components/captive_portal.gypi
+++ b/components/captive_portal.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/captive_portal
'target_name': 'captive_portal',
'type': '<(component)',
'dependencies': [
@@ -19,6 +20,7 @@
'CAPTIVE_PORTAL_IMPLEMENTATION',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'captive_portal/captive_portal_detector.cc',
'captive_portal/captive_portal_detector.h',
'captive_portal/captive_portal_types.cc',
@@ -27,6 +29,7 @@
],
},
{
+ # GN version: //components/captive_portal:test_support
'target_name': 'captive_portal_test_support',
'type': 'static_library',
'dependencies': [
@@ -36,6 +39,7 @@
'../url/url.gyp:url_lib',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'captive_portal/captive_portal_testing_utils.cc',
'captive_portal/captive_portal_testing_utils.h',
],
diff --git a/components/captive_portal/BUILD.gn b/components/captive_portal/BUILD.gn
new file mode 100644
index 0000000..67086bb
--- /dev/null
+++ b/components/captive_portal/BUILD.gn
@@ -0,0 +1,35 @@
+# 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.
+
+component("captive_portal") {
+ sources = [
+ "captive_portal_detector.cc",
+ "captive_portal_detector.h",
+ "captive_portal_types.cc",
+ "captive_portal_types.h",
+ "captive_portal_export.h",
+ ]
+
+ defines = [ "CAPTIVE_PORTAL_IMPLEMENTATION" ]
+
+ deps = [
+ "//base",
+ "//net",
+ "//url",
+ ]
+}
+
+static_library("test_support") {
+ sources = [
+ "captive_portal_testing_utils.cc",
+ "captive_portal_testing_utils.h",
+ ]
+
+ deps = [
+ ":captive_portal",
+ "//base",
+ "//net",
+ "//url",
+ ]
+}
diff --git a/components/data_reduction_proxy.gypi b/components/data_reduction_proxy.gypi
index 2bdfaa1..77f9f69 100644
--- a/components/data_reduction_proxy.gypi
+++ b/components/data_reduction_proxy.gypi
@@ -6,6 +6,7 @@
{
'targets': [
{
+ # GN version: //components/data_reduction_proxy/browser
'target_name': 'data_reduction_proxy_browser',
'type': 'static_library',
'dependencies': [
@@ -19,6 +20,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc',
'data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h',
'data_reduction_proxy/browser/data_reduction_proxy_config_service.cc',
@@ -39,6 +41,7 @@
],
},
{
+ # GN version: //components/data_reduction_proxy/common
'target_name': 'data_reduction_proxy_common',
'type': 'static_library',
'dependencies': [
@@ -48,6 +51,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'data_reduction_proxy/common/data_reduction_proxy_headers.cc',
'data_reduction_proxy/common/data_reduction_proxy_headers.h',
'data_reduction_proxy/common/data_reduction_proxy_pref_names.cc',
@@ -57,6 +61,7 @@
],
},
{
+ # GN version: //components/data_reduction_proxy/browser:test_support
'target_name': 'data_reduction_proxy_test_support',
'type': 'static_library',
'dependencies' : [
@@ -72,6 +77,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'data_reduction_proxy/browser/data_reduction_proxy_params_test_utils.cc',
'data_reduction_proxy/browser/data_reduction_proxy_params_test_utils.h',
'data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc',
diff --git a/components/data_reduction_proxy/browser/BUILD.gn b/components/data_reduction_proxy/browser/BUILD.gn
new file mode 100644
index 0000000..0bc9879
--- /dev/null
+++ b/components/data_reduction_proxy/browser/BUILD.gn
@@ -0,0 +1,52 @@
+# 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("browser") {
+ sources = [
+ "data_reduction_proxy_auth_request_handler.cc",
+ "data_reduction_proxy_auth_request_handler.h",
+ "data_reduction_proxy_config_service.cc",
+ "data_reduction_proxy_config_service.h",
+ "data_reduction_proxy_configurator.h",
+ "data_reduction_proxy_metrics.cc",
+ "data_reduction_proxy_metrics.h",
+ "data_reduction_proxy_params.cc",
+ "data_reduction_proxy_params.h",
+ "data_reduction_proxy_prefs.cc",
+ "data_reduction_proxy_prefs.h",
+ "data_reduction_proxy_protocol.cc",
+ "data_reduction_proxy_protocol.h",
+ "data_reduction_proxy_settings.cc",
+ "data_reduction_proxy_settings.h",
+ "data_reduction_proxy_usage_stats.cc",
+ "data_reduction_proxy_usage_stats.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/data_reduction_proxy/common",
+ "//components/pref_registry",
+ "//crypto",
+ "//net",
+ ]
+}
+
+static_library("test_support") {
+ sources = [
+ "data_reduction_proxy_params_test_utils.cc",
+ "data_reduction_proxy_params_test_utils.h",
+ "data_reduction_proxy_settings_test_utils.cc",
+ "data_reduction_proxy_settings_test_utils.h",
+ ]
+
+ deps = [
+ ":browser",
+ "//base",
+ "//components/data_reduction_proxy/common",
+ "//net",
+ "//net:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/data_reduction_proxy/common/BUILD.gn b/components/data_reduction_proxy/common/BUILD.gn
new file mode 100644
index 0000000..ed85ddf
--- /dev/null
+++ b/components/data_reduction_proxy/common/BUILD.gn
@@ -0,0 +1,18 @@
+# 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("common") {
+ sources = [
+ "data_reduction_proxy_headers.cc",
+ "data_reduction_proxy_headers.h",
+ "data_reduction_proxy_pref_names.cc",
+ "data_reduction_proxy_pref_names.h",
+ "data_reduction_proxy_switches.cc",
+ "data_reduction_proxy_switches.h",
+ ]
+
+ deps = [
+ "//base",
+ ]
+}
diff --git a/components/dom_distiller/content/BUILD.gn b/components/dom_distiller/content/BUILD.gn
index b8ef83d..998665a 100644
--- a/components/dom_distiller/content/BUILD.gn
+++ b/components/dom_distiller/content/BUILD.gn
@@ -21,7 +21,11 @@ if (!is_ios) {
"//content/public/browser",
"//net",
"//skia",
- #'../sync/sync.gyp:sync', TODO(GYP)
+ "//sync",
+ ]
+
+ forward_dependent_configs_from = [
+ "//components/dom_distiller/core",
]
}
}
diff --git a/components/rappor.gypi b/components/rappor.gypi
index 346d208..f646c87 100644
--- a/components/rappor.gypi
+++ b/components/rappor.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/rappor
'target_name': 'rappor',
'type': 'static_library',
'include_dirs': [
@@ -19,6 +20,7 @@
'variations',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'rappor/bloom_filter.cc',
'rappor/bloom_filter.h',
'rappor/byte_vector_utils.cc',
diff --git a/components/rappor/BUILD.gn b/components/rappor/BUILD.gn
new file mode 100644
index 0000000..3127aba
--- /dev/null
+++ b/components/rappor/BUILD.gn
@@ -0,0 +1,32 @@
+# 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("rappor") {
+ sources = [
+ "bloom_filter.cc",
+ "bloom_filter.h",
+ "byte_vector_utils.cc",
+ "byte_vector_utils.h",
+ "log_uploader.cc",
+ "log_uploader.h",
+ "rappor_metric.cc",
+ "rappor_metric.h",
+ "rappor_parameters.cc",
+ "rappor_parameters.h",
+ "rappor_pref_names.cc",
+ "rappor_pref_names.h",
+ "rappor_service.cc",
+ "rappor_service.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/metrics",
+ "//components/rappor/proto",
+ "//components/variations",
+ "//crypto",
+ "//net",
+ "//third_party/smhasher:cityhash",
+ ]
+}
diff --git a/components/rappor/proto/BUILD.gn b/components/rappor/proto/BUILD.gn
new file mode 100644
index 0000000..7b11a2c
--- /dev/null
+++ b/components/rappor/proto/BUILD.gn
@@ -0,0 +1,11 @@
+# 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 = [
+ "rappor_metric.proto",
+ ]
+}
diff --git a/components/translate.gypi b/components/translate.gypi
index 8b94c2b..0c738c2 100644
--- a/components/translate.gypi
+++ b/components/translate.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/translate/core/browser
'target_name': 'translate_core_browser',
'type': 'static_library',
'dependencies': [
@@ -25,6 +26,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'translate/core/browser/language_state.cc',
'translate/core/browser/language_state.h',
'translate/core/browser/options_menu_model.cc',
@@ -61,6 +63,7 @@
],
},
{
+ # GN version: //components/translate/core/common
'target_name': 'translate_core_common',
'type': 'static_library',
'dependencies': [
@@ -71,6 +74,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'translate/core/common/translate_constants.cc',
'translate/core/common/translate_constants.h',
'translate/core/common/translate_errors.h',
@@ -87,6 +91,7 @@
],
},
{
+ # GN version: //components/translate/core/language_detection
'target_name': 'translate_core_language_detection',
'type': 'static_library',
'dependencies': [
@@ -98,6 +103,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'translate/core/language_detection/language_detection_util.cc',
'translate/core/language_detection/language_detection_util.h',
],
@@ -119,6 +125,7 @@
['OS != "ios"', {
'targets': [
{
+ # GN version: //components/translate/content/browser
'target_name': 'translate_content_browser',
'type': 'static_library',
'dependencies': [
@@ -130,6 +137,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'translate/content/browser/browser_cld_data_provider.h',
'translate/content/browser/content_translate_driver.cc',
'translate/content/browser/content_translate_driver.h',
@@ -150,6 +158,7 @@
],
},
{
+ # GN version: //components/translate/content/common
'target_name': 'translate_content_common',
'type': 'static_library',
'dependencies': [
@@ -163,6 +172,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'translate/content/common/translate_messages.cc',
'translate/content/common/translate_messages.h',
],
@@ -176,6 +186,7 @@
],
},
{
+ # GN version: //components/translate/content/renderer
'target_name': 'translate_content_renderer',
'type': 'static_library',
'dependencies': [
@@ -187,6 +198,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'translate/content/renderer/renderer_cld_data_provider.h',
],
'conditions': [
diff --git a/components/translate/BUILD.gn b/components/translate/BUILD.gn
deleted file mode 100644
index 8fb3512..0000000
--- a/components/translate/BUILD.gn
+++ /dev/null
@@ -1,72 +0,0 @@
-# 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("translate_core_browser") {
- sources = [
- "core/browser/language_state.cc",
- "core/browser/language_state.h",
- "core/browser/page_translated_details.h",
- "core/browser/translate_accept_languages.cc",
- "core/browser/translate_accept_languages.h",
- "core/browser/translate_browser_metrics.cc",
- "core/browser/translate_browser_metrics.h",
- "core/browser/translate_client.h",
- "core/browser/translate_download_manager.cc",
- "core/browser/translate_download_manager.h",
- "core/browser/translate_driver.h",
- "core/browser/translate_error_details.h",
- "core/browser/translate_event_details.cc",
- "core/browser/translate_event_details.h",
- "core/browser/translate_language_list.cc",
- "core/browser/translate_language_list.h",
- "core/browser/translate_prefs.cc",
- "core/browser/translate_prefs.h",
- "core/browser/translate_script.cc",
- "core/browser/translate_script.h",
- "core/browser/translate_url_fetcher.cc",
- "core/browser/translate_url_fetcher.h",
- "core/browser/translate_url_util.cc",
- "core/browser/translate_url_util.h",
- ]
-
- deps = [
- ":translate_core_common",
- "//base",
- "//components/language_usage_metrics",
- "//components/resources:components_resources",
- "//url",
- ]
- if (!is_android) {
- # TODO(brettw) move thise above. This project uses net headers. This is
- # excluded for Android since net doesn't work in the GN build at the time
- # of this writing.
- deps += [
- "//net",
- "//ui/base",
- ]
- }
-}
-
-static_library("translate_core_common") {
- sources = [
- "core/common/language_detection_details.cc",
- "core/common/language_detection_details.h",
- "core/common/translate_constants.cc",
- "core/common/translate_constants.h",
- "core/common/translate_errors.h",
- "core/common/translate_metrics.cc",
- "core/common/translate_metrics.h",
- "core/common/translate_pref_names.cc",
- "core/common/translate_pref_names.h",
- "core/common/translate_switches.cc",
- "core/common/translate_switches.h",
- "core/common/translate_util.cc",
- "core/common/translate_util.h",
- ]
-
- deps = [
- "//base",
- "//url",
- ]
-}
diff --git a/components/translate/content/browser/BUILD.gn b/components/translate/content/browser/BUILD.gn
new file mode 100644
index 0000000..d94c338
--- /dev/null
+++ b/components/translate/content/browser/BUILD.gn
@@ -0,0 +1,31 @@
+# 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/features.gni")
+
+static_library("browser") {
+ sources = [
+ "browser_cld_data_provider.h",
+ "content_translate_driver.cc",
+ "content_translate_driver.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/translate/core/browser",
+ "//content/public/browser",
+ ]
+
+ if (cld2_data_source == "standalone" || cld2_data_source == "component") {
+ sources += [
+ "data_file_browser_cld_data_provider.cc",
+ "data_file_browser_cld_data_provider.h",
+ ]
+ } else if (cld2_data_source == "static") {
+ sources += [
+ "static_browser_cld_data_provider.cc",
+ "static_browser_cld_data_provider.h",
+ ]
+ }
+}
diff --git a/components/translate/content/common/BUILD.gn b/components/translate/content/common/BUILD.gn
new file mode 100644
index 0000000..0125046
--- /dev/null
+++ b/components/translate/content/common/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.
+
+import("//build/config/features.gni")
+
+static_library("common") {
+ sources = [
+ "translate_messages.cc",
+ "translate_messages.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/translate/core/common",
+ "//components/translate/core/language_detection",
+ "//content/public/common",
+ "//ipc",
+ ]
+
+ if (cld2_data_source == "standalone" || cld2_data_source == "component") {
+ sources += [
+ "data_file_cld_data_provider_messages.cc",
+ "data_file_cld_data_provider_messages.h",
+ ]
+ }
+}
diff --git a/components/translate/content/renderer/BUILD.gn b/components/translate/content/renderer/BUILD.gn
new file mode 100644
index 0000000..5651dbd
--- /dev/null
+++ b/components/translate/content/renderer/BUILD.gn
@@ -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/features.gni")
+
+static_library("renderer") {
+ sources = [
+ "renderer_cld_data_provider.h",
+ ]
+
+ deps = [
+ "//base",
+ "//content/public/common",
+ "//ipc",
+ ]
+
+ if (cld_version == 0 || cld_version == 2) {
+ deps += [ "//third_party/cld_2" ]
+ }
+
+ if (cld2_data_source == "standalone" || cld2_data_source == "component") {
+ sources += [
+ "data_file_renderer_cld_data_provider.cc",
+ "data_file_renderer_cld_data_provider.h",
+ ]
+ } else if (cld2_data_source == "static") {
+ sources += [
+ "static_renderer_cld_data_provider.cc",
+ "static_renderer_cld_data_provider.h",
+ ]
+ }
+}
diff --git a/components/translate/core/browser/BUILD.gn b/components/translate/core/browser/BUILD.gn
new file mode 100644
index 0000000..9562af8
--- /dev/null
+++ b/components/translate/core/browser/BUILD.gn
@@ -0,0 +1,42 @@
+# 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("browser") {
+ sources = [
+ "language_state.cc",
+ "language_state.h",
+ "page_translated_details.h",
+ "translate_accept_languages.cc",
+ "translate_accept_languages.h",
+ "translate_browser_metrics.cc",
+ "translate_browser_metrics.h",
+ "translate_client.h",
+ "translate_download_manager.cc",
+ "translate_download_manager.h",
+ "translate_driver.h",
+ "translate_error_details.h",
+ "translate_event_details.cc",
+ "translate_event_details.h",
+ "translate_language_list.cc",
+ "translate_language_list.h",
+ "translate_prefs.cc",
+ "translate_prefs.h",
+ "translate_script.cc",
+ "translate_script.h",
+ "translate_url_fetcher.cc",
+ "translate_url_fetcher.h",
+ "translate_url_util.cc",
+ "translate_url_util.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/language_usage_metrics",
+ "//components/resources:components_resources",
+ "//components/translate/core/common",
+ "//net",
+ "//ui/base",
+ "//url",
+ ]
+}
diff --git a/components/translate/core/common/BUILD.gn b/components/translate/core/common/BUILD.gn
new file mode 100644
index 0000000..0378ba1
--- /dev/null
+++ b/components/translate/core/common/BUILD.gn
@@ -0,0 +1,26 @@
+# 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("common") {
+ sources = [
+ "language_detection_details.cc",
+ "language_detection_details.h",
+ "translate_constants.cc",
+ "translate_constants.h",
+ "translate_errors.h",
+ "translate_metrics.cc",
+ "translate_metrics.h",
+ "translate_pref_names.cc",
+ "translate_pref_names.h",
+ "translate_switches.cc",
+ "translate_switches.h",
+ "translate_util.cc",
+ "translate_util.h",
+ ]
+
+ deps = [
+ "//base",
+ "//url",
+ ]
+}
diff --git a/components/translate/core/language_detection/BUILD.gn b/components/translate/core/language_detection/BUILD.gn
new file mode 100644
index 0000000..f704844
--- /dev/null
+++ b/components/translate/core/language_detection/BUILD.gn
@@ -0,0 +1,25 @@
+# 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/features.gni")
+
+static_library("language_detection") {
+ sources = [
+ "language_detection_util.cc",
+ "language_detection_util.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/translate/core/common",
+ "//url",
+ ]
+
+ if (cld_version == 0 || cld_version == 1) {
+ deps += [ "//third_party/cld" ]
+ }
+ if (cld_version == 0 || cld_version == 2) {
+ deps += [ "//third_party/cld_2" ]
+ }
+}
diff --git a/components/usb_service.gypi b/components/usb_service.gypi
index 33b38a6..1ce2fe7 100644
--- a/components/usb_service.gypi
+++ b/components/usb_service.gypi
@@ -4,6 +4,7 @@
{
'targets': [{
+ # GN version: //components/usb_service
'target_name': 'usb_service',
'type': '<(component)',
'dependencies': [
@@ -20,6 +21,7 @@
'..',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'usb_service/usb_context.cc',
'usb_service/usb_context.h',
'usb_service/usb_device_impl.cc',
diff --git a/components/usb_service/BUILD.gn b/components/usb_service/BUILD.gn
new file mode 100644
index 0000000..6439d05
--- /dev/null
+++ b/components/usb_service/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.
+
+component("usb_service") {
+ sources = [
+ "usb_context.cc",
+ "usb_context.h",
+ "usb_device_impl.cc",
+ "usb_device_impl.h",
+ "usb_device.h",
+ "usb_device_handle_impl.cc",
+ "usb_device_handle_impl.h",
+ "usb_device_handle.h",
+ "usb_error.cc",
+ "usb_error.h",
+ "usb_interface.h",
+ "usb_interface_impl.cc",
+ "usb_interface_impl.h",
+ "usb_service.h",
+ "usb_service_impl.cc",
+ ]
+
+ defines = [ "USB_SERVICE_IMPLEMENTATION" ]
+
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//content/public/browser",
+ "//net",
+ "//third_party/libusb",
+ ]
+
+ if (is_linux) {
+ configs += [ "//build/config/linux:udev" ]
+ }
+}
diff --git a/components/web_modal.gypi b/components/web_modal.gypi
index 356cb7e..2502803 100644
--- a/components/web_modal.gypi
+++ b/components/web_modal.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/web_modal
'target_name': 'web_modal',
'type': 'static_library',
'include_dirs': [
@@ -15,10 +16,8 @@
'../content/content.gyp:content_browser',
'../skia/skia.gyp:skia',
],
- 'defines': [
- 'WEB_MODAL_IMPLEMENTATION',
- ],
'sources': [
+ # Note: sources list duplicated in GN build.
'web_modal/modal_dialog_host.cc',
'web_modal/modal_dialog_host.h',
'web_modal/native_web_contents_modal_dialog.h',
@@ -32,12 +31,14 @@
],
},
{
+ # GN version: //components/web_modal:test_support
'target_name': 'web_modal_test_support',
'type': 'static_library',
'dependencies': [
'web_modal',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'web_modal/test_web_contents_modal_dialog_host.cc',
'web_modal/test_web_contents_modal_dialog_host.h',
'web_modal/test_web_contents_modal_dialog_manager_delegate.cc',
diff --git a/components/web_modal/BUILD.gn b/components/web_modal/BUILD.gn
new file mode 100644
index 0000000..f603fdd
--- /dev/null
+++ b/components/web_modal/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.
+
+static_library("web_modal") {
+ sources = [
+ "modal_dialog_host.cc",
+ "modal_dialog_host.h",
+ "native_web_contents_modal_dialog.h",
+ "single_web_contents_dialog_manager.h",
+ "web_contents_modal_dialog_host.cc",
+ "web_contents_modal_dialog_host.h",
+ "web_contents_modal_dialog_manager.cc",
+ "web_contents_modal_dialog_manager.h",
+ "web_contents_modal_dialog_manager_delegate.cc",
+ "web_contents_modal_dialog_manager_delegate.h",
+ ]
+
+ deps = [
+ "//base",
+ "//content/public/browser",
+ "//skia",
+ ]
+}
+
+static_library("test_support") {
+ sources = [
+ "test_web_contents_modal_dialog_host.cc",
+ "test_web_contents_modal_dialog_host.h",
+ "test_web_contents_modal_dialog_manager_delegate.cc",
+ "test_web_contents_modal_dialog_manager_delegate.h",
+ ]
+
+ deps = [
+ ":web_modal",
+ ]
+}
diff --git a/third_party/cld/BUILD.gn b/third_party/cld/BUILD.gn
new file mode 100644
index 0000000..d3b5774
--- /dev/null
+++ b/third_party/cld/BUILD.gn
@@ -0,0 +1,111 @@
+# 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("cld_config") {
+ defines = [ "CLD_WINDOWS" ]
+ include_dirs = [ "." ]
+}
+
+static_library("cld") {
+ sources = [
+ "encodings/compact_lang_det/cldutil.cc",
+ "encodings/compact_lang_det/cldutil.h",
+ "encodings/compact_lang_det/cldutil_dbg.h",
+ "encodings/compact_lang_det/cldutil_dbg_empty.cc",
+ "encodings/compact_lang_det/compact_lang_det.cc",
+ "encodings/compact_lang_det/compact_lang_det.h",
+ "encodings/compact_lang_det/compact_lang_det_impl.cc",
+ "encodings/compact_lang_det/compact_lang_det_impl.h",
+ "encodings/compact_lang_det/ext_lang_enc.cc",
+ "encodings/compact_lang_det/ext_lang_enc.h",
+ "encodings/compact_lang_det/getonescriptspan.cc",
+ "encodings/compact_lang_det/getonescriptspan.h",
+ "encodings/compact_lang_det/letterscript_enum.cc",
+ "encodings/compact_lang_det/letterscript_enum.h",
+ "encodings/compact_lang_det/string_byte_sink.cc",
+ "encodings/compact_lang_det/string_byte_sink.h",
+ "encodings/compact_lang_det/subsetsequence.cc",
+ "encodings/compact_lang_det/subsetsequence.h",
+ "encodings/compact_lang_det/tote.cc",
+ "encodings/compact_lang_det/tote.h",
+ "encodings/compact_lang_det/utf8propjustletter.h",
+ "encodings/compact_lang_det/utf8propletterscriptnum.h",
+ "encodings/compact_lang_det/utf8scannotjustletterspecial.h",
+ "encodings/compact_lang_det/generated/cld_generated_score_quadchrome_0406.cc",
+ "encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc",
+ "encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc",
+ "encodings/compact_lang_det/generated/compact_lang_det_generated_deltaoctachrome.cc",
+ "encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h",
+ "encodings/compact_lang_det/generated/compact_lang_det_generated_quadschrome.cc",
+ "encodings/compact_lang_det/win/cld_basictypes.h",
+ "encodings/compact_lang_det/win/cld_commandlineflags.h",
+ "encodings/compact_lang_det/win/cld_google.h",
+ "encodings/compact_lang_det/win/cld_htmlutils.h",
+ "encodings/compact_lang_det/win/cld_htmlutils_windows.cc",
+ "encodings/compact_lang_det/win/cld_logging.h",
+ "encodings/compact_lang_det/win/cld_macros.h",
+ "encodings/compact_lang_det/win/cld_strtoint.h",
+ "encodings/compact_lang_det/win/cld_unicodetext.cc",
+ "encodings/compact_lang_det/win/cld_unicodetext.h",
+ "encodings/compact_lang_det/win/cld_unilib.h",
+ "encodings/compact_lang_det/win/cld_unilib_windows.cc",
+ "encodings/compact_lang_det/win/cld_utf.h",
+ "encodings/compact_lang_det/win/cld_utf8statetable.cc",
+ "encodings/compact_lang_det/win/cld_utf8statetable.h",
+ "encodings/compact_lang_det/win/cld_utf8utils.h",
+ "encodings/compact_lang_det/win/cld_utf8utils_windows.cc",
+ "encodings/internal/encodings.cc",
+ "encodings/proto/encodings.pb.h",
+ "encodings/public/encodings.h",
+ "languages/internal/languages.cc",
+ "languages/proto/languages.pb.h",
+ "languages/public/languages.h",
+ "base/basictypes.h",
+ "base/build_config.h",
+ "base/casts.h",
+ "base/commandlineflags.h",
+ "base/global_strip_options.h",
+ "base/logging.h",
+ "base/macros.h",
+ "base/port.h",
+ "base/crash.h",
+ "base/dynamic_annotations.h",
+ "base/scoped_ptr.h",
+ "base/stl_decl_msvc.h",
+ "base/log_severity.h",
+ "base/strtoint.h",
+ "base/vlog_is_on.h",
+ "base/string_util.h",
+ "base/type_traits.h",
+ "base/template_util.h",
+ ]
+
+ configs -= [
+ # We have conflicting versions of some base files.
+ "//build/config/compiler:default_include_dirs",
+ "//build/config/compiler:chromium_code",
+ ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ direct_dependent_configs = [ ":cld_config" ]
+
+ if (is_win) {
+ defines = [ "COMPILER_MSVC" ]
+ cflags = [
+ "/wd4005", # Macro defined twice.
+ "/wd4006", # #undef expected an identifier.
+ "/wd4309", # Truncation of constant value.
+ "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
+ ]
+ } else {
+ defines = [ "COMPILER_GCC" ]
+ }
+
+ deps = [
+ "//third_party/icu:icuuc",
+ ]
+
+ forward_dependent_configs_from = [
+ "//third_party/icu:icuuc",
+ ]
+}
diff --git a/third_party/cld_2/BUILD.gn b/third_party/cld_2/BUILD.gn
new file mode 100644
index 0000000..70944665
--- /dev/null
+++ b/third_party/cld_2/BUILD.gn
@@ -0,0 +1,147 @@
+# 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/features.gni")
+
+# May need to make this a build arg.
+cld2_table_size = 2
+
+static_library("cld_2") {
+ sources = [
+ "src/internal/cld2tablesummary.h",
+ "src/internal/cldutil.cc",
+ "src/internal/cldutil.h",
+ "src/internal/cldutil_shared.cc",
+ "src/internal/cldutil_shared.h",
+ "src/internal/compact_lang_det.cc",
+ "src/internal/compact_lang_det_hint_code.cc",
+ "src/internal/compact_lang_det_hint_code.h",
+ "src/internal/compact_lang_det_impl.cc",
+ "src/internal/compact_lang_det_impl.h",
+ "src/internal/debug.h",
+ "src/internal/debug_empty.cc",
+ "src/internal/fixunicodevalue.cc",
+ "src/internal/fixunicodevalue.h",
+ "src/internal/generated_distinct_bi_0.cc",
+ "src/internal/generated_entities.cc",
+ "src/internal/generated_language.cc",
+ "src/internal/generated_language.h",
+ "src/internal/generated_ulscript.cc",
+ "src/internal/generated_ulscript.h",
+ "src/internal/getonescriptspan.cc",
+ "src/internal/getonescriptspan.h",
+ "src/internal/integral_types.h",
+ "src/internal/lang_script.cc",
+ "src/internal/lang_script.h",
+ "src/internal/langspan.h",
+ "src/internal/offsetmap.cc",
+ "src/internal/offsetmap.h",
+ "src/internal/port.h",
+ "src/internal/scoreonescriptspan.cc",
+ "src/internal/scoreonescriptspan.h",
+ "src/internal/stringpiece.h",
+ "src/internal/tote.cc",
+ "src/internal/tote.h",
+ "src/internal/utf8prop_lettermarkscriptnum.h",
+ "src/internal/utf8repl_lettermarklower.h",
+ "src/internal/utf8scannot_lettermarkspecial.h",
+ "src/internal/utf8statetable.cc",
+ "src/internal/utf8statetable.h",
+ "src/public/compact_lang_det.h",
+ "src/public/encodings.h",
+ ]
+
+ include_dirs = [
+ "src/internal",
+ "src/public",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ if (is_win) {
+ cflags = [ "/wd4267" ] # size_t -> int conversion.
+ }
+ if (cld2_data_source != "static") {
+ assert(false, "Non-static mode isn't implemented, implement me")
+ }
+}
+
+executable("cld_2_dynamic_data_tool") {
+ sources = [
+ "src/internal/cld2_dynamic_data.h",
+ "src/internal/cld2_dynamic_data.cc",
+ "src/internal/cld2_dynamic_data_extractor.h",
+ "src/internal/cld2_dynamic_data_extractor.cc",
+ "src/internal/cld2_dynamic_data_loader.h",
+ "src/internal/cld2_dynamic_data_loader.cc",
+ "src/internal/cld2_dynamic_data_tool.cc",
+ "src/internal/cld2_generated_cjk_compatible.cc",
+ "src/internal/cld2_generated_deltaoctachrome0122.cc",
+ "src/internal/cld2_generated_distinctoctachrome0122.cc",
+ "src/internal/cld2tablesummary.h",
+ "src/internal/cld_generated_cjk_delta_bi_4.cc",
+ "src/internal/cld_generated_cjk_uni_prop_80.cc",
+ "src/internal/cld_generated_score_quad_octa_0122_2.cc",
+ "src/internal/cldutil.cc",
+ "src/internal/cldutil.h",
+ "src/internal/cldutil_shared.cc",
+ "src/internal/cldutil_shared.h",
+ "src/internal/compact_lang_det.cc",
+ "src/internal/compact_lang_det_hint_code.cc",
+ "src/internal/compact_lang_det_hint_code.h",
+ "src/internal/compact_lang_det_impl.cc",
+ "src/internal/compact_lang_det_impl.h",
+ "src/internal/debug.h",
+ "src/internal/debug_empty.cc",
+ "src/internal/fixunicodevalue.cc",
+ "src/internal/fixunicodevalue.h",
+ "src/internal/generated_distinct_bi_0.cc",
+ "src/internal/generated_entities.cc",
+ "src/internal/generated_language.cc",
+ "src/internal/generated_language.h",
+ "src/internal/generated_ulscript.cc",
+ "src/internal/generated_ulscript.h",
+ "src/internal/getonescriptspan.cc",
+ "src/internal/getonescriptspan.h",
+ "src/internal/integral_types.h",
+ "src/internal/lang_script.cc",
+ "src/internal/lang_script.h",
+ "src/internal/langspan.h",
+ "src/internal/offsetmap.cc",
+ "src/internal/offsetmap.h",
+ "src/internal/port.h",
+ "src/internal/scoreonescriptspan.cc",
+ "src/internal/scoreonescriptspan.h",
+ "src/internal/stringpiece.h",
+ "src/internal/tote.cc",
+ "src/internal/tote.h",
+ "src/internal/utf8prop_lettermarkscriptnum.h",
+ "src/internal/utf8repl_lettermarklower.h",
+ "src/internal/utf8scannot_lettermarkspecial.h",
+ "src/internal/utf8statetable.cc",
+ "src/internal/utf8statetable.h",
+ "src/public/compact_lang_det.h",
+ "src/public/encodings.h",
+ ]
+
+ include_dirs = [
+ "src/internal",
+ "src/public",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ if (is_win) {
+ cflags = [ "/wd4267" ] # size_t -> int conversion.
+ }
+ if (cld2_table_size == 0) {
+ sources += [ "src/internal/cld2_generated_quadchrome0122_16.cc" ]
+ } else if (cld2_table_size == 1) {
+ sources += [ "src/internal/cld2_generated_quadchrome0122_19.cc" ]
+ } else if (cld2_table_size == 2) {
+ sources += [ "src/internal/cld2_generated_quadchrome0122_2.cc" ]
+ }
+}
diff --git a/third_party/cld_2/cld_2.gyp b/third_party/cld_2/cld_2.gyp
index 6626a47..267531f 100644
--- a/third_party/cld_2/cld_2.gyp
+++ b/third_party/cld_2/cld_2.gyp
@@ -17,6 +17,7 @@
{
'targets': [
{
+ # GN version: //third_party/cld_2:cld_2_dynamic_data_tool
'target_name': 'cld_2_dynamic_data_tool',
'type': 'executable',
'include_dirs': [
@@ -24,6 +25,7 @@
'src/public',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'src/internal/cld2_dynamic_data.h',
'src/internal/cld2_dynamic_data.cc',
'src/internal/cld2_dynamic_data_extractor.h',
@@ -104,6 +106,7 @@
],
},
{
+ # GN version: //third_party/cld_2
'target_name': 'cld_2',
'type': 'static_library',
'include_dirs': [
@@ -111,6 +114,7 @@
'src/public',
],
'sources': [
+ # Note: sources list duplicated in GN build.
'src/internal/cld2tablesummary.h',
'src/internal/cldutil.cc',
'src/internal/cldutil.h',