Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: chrome/common/extensions/api/BUILD.gn

Issue 489153003: Split bundle generation steps so that API registration is generated in browser, not common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extra targets Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/BUILD.gn
diff --git a/chrome/common/extensions/api/BUILD.gn b/chrome/common/extensions/api/BUILD.gn
index d4362fb78091c036805a18b9617a50fe8e11445e..c877566ca769e80f62bbbc9b9bfab2423982b3d1 100644
--- a/chrome/common/extensions/api/BUILD.gn
+++ b/chrome/common/extensions/api/BUILD.gn
@@ -2,53 +2,17 @@
# 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")
import("//extensions/generated_extensions_api.gni")
+import("schemas.gni")
-gypi_values = exec_script(
- "//build/gypi_to_gn.py",
- [ rebase_path("api.gyp") ],
- "scope",
- [ "api.gyp" ])
-
-# Common sources that are both bundled and compiled.
# GYP version: chrome/common/extensions/api/api.gyp:chrome_api
generated_extensions_api("api") {
- if (is_android) {
- # Should be eliminated. See crbug.com/305852.
- sources = gypi_values.android_schema_files
- } else {
- sources = gypi_values.main_schema_files
- if (is_chromeos) {
- sources += gypi_values.chromeos_schema_files
- if (is_chrome_branded) {
- sources += gypi_values.chromeos_branded_schema_files
- }
- }
- if (enable_webrtc) {
- sources += gypi_values.webrtc_schema_files
- }
- }
-
- if (!is_android) {
- uncompiled_sources = gypi_values.main_non_compiled_schema_files
- }
-
- impl_dir = "//chrome/browser/extensions/api"
- root_namespace = "extensions::api::%(namespace)s"
+ schemas = true
bundle = true
+}
- deps = [
- # Different APIs include some headers from chrome/common that in turn
- # include generated headers from these targets.
- # TODO(brettw) this should be made unnecessary if possible.
- "//components/metrics/proto",
-
- "//content/public/browser",
- "//skia",
- "//sync",
- ]
- if (is_chromeos) {
- # deps += [ "<(DEPTH)/chrome/chrome.gyp:drive_proto" ] TODO)GYP)
- }
+# GYP version: chrome/browser/extensions/api/api.gyp:chrome_api_registration
+generated_extensions_api("api_registration") {
Yoyo Zhou 2014/08/23 01:15:03 Logically, this target should live in chrome/brows
+ impl_dir = "//chrome/browser/extensions/api"
+ bundle_registration = true
}

Powered by Google App Engine
This is Rietveld 408576698