diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-10 22:00:37 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-10 22:00:37 +0000 |
commit | b9f4c684a708d9d7e2f8076beb77b3382ae75667 (patch) | |
tree | 356760b8dc54a50c46d8af2fbc0414138331164a /components/translate | |
parent | 2501ca5dbd5f1a495b306937c7fed7c32698c943 (diff) | |
download | chromium_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
Diffstat (limited to 'components/translate')
-rw-r--r-- | components/translate/BUILD.gn | 72 | ||||
-rw-r--r-- | components/translate/content/browser/BUILD.gn | 31 | ||||
-rw-r--r-- | components/translate/content/common/BUILD.gn | 27 | ||||
-rw-r--r-- | components/translate/content/renderer/BUILD.gn | 33 | ||||
-rw-r--r-- | components/translate/core/browser/BUILD.gn | 42 | ||||
-rw-r--r-- | components/translate/core/common/BUILD.gn | 26 | ||||
-rw-r--r-- | components/translate/core/language_detection/BUILD.gn | 25 |
7 files changed, 184 insertions, 72 deletions
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" ] + } +} |