summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/common')
-rw-r--r--extensions/common/api/BUILD.gn30
-rw-r--r--extensions/common/api/api.gyp49
-rw-r--r--extensions/common/api/schemas.gni17
-rw-r--r--extensions/common/api/schemas.gypi51
4 files changed, 78 insertions, 69 deletions
diff --git a/extensions/common/api/BUILD.gn b/extensions/common/api/BUILD.gn
index 1c924bd..10a69fa 100644
--- a/extensions/common/api/BUILD.gn
+++ b/extensions/common/api/BUILD.gn
@@ -3,31 +3,19 @@
# found in the LICENSE file.
import("//extensions/generated_extensions_api.gni")
+import("schemas.gni")
# GYP version: extensions/common/api/api.gyp:extensions_api
generated_extensions_api("api") {
- sources = [
- "app_runtime.idl",
- "app_view_internal.json",
- "cast_channel.idl",
- "dns.idl",
- "extensions_manifest_types.json",
- "hid.idl",
- "power.idl",
- "runtime.json",
- "serial.idl",
- "socket.idl",
- "sockets_tcp.idl",
- "sockets_tcp_server.idl",
- "sockets_udp.idl",
- "storage.json",
- "test.json",
- "usb.idl",
- "usb_private.idl",
- ]
- root_namespace = "extensions::core_api::%(namespace)s"
- impl_dir = "//extensions/browser/api"
+ schemas = true
bundle = true
+}
+
+# GYP version: extensions/browser/api/api_registration.gyp:extensions_api_registration
+generated_extensions_api("api_registration") {
+ impl_dir = "//extensions/browser/api"
+ bundle_registration = true
+
deps = [
"//device/serial",
"//skia",
diff --git a/extensions/common/api/api.gyp b/extensions/common/api/api.gyp
index c95217c..f66baef 100644
--- a/extensions/common/api/api.gyp
+++ b/extensions/common/api/api.gyp
@@ -8,59 +8,12 @@
# GN version: //extensions/common/api
'target_name': 'extensions_api',
'type': 'static_library',
- 'sources': [
- '<@(schema_files)',
- ],
# TODO(jschuh): http://crbug.com/167187 size_t -> int
'msvs_disabled_warnings': [ 4267 ],
'includes': [
'../../../build/json_schema_bundle_compile.gypi',
'../../../build/json_schema_compile.gypi',
- ],
- 'variables': {
- 'chromium_code': 1,
- 'non_compiled_schema_files': [
- ],
- 'conditions': [
- ['enable_extensions==1', {
- # Note: file list duplicated in GN build.
- 'schema_files': [
- 'app_runtime.idl',
- 'app_view_internal.json',
- 'cast_channel.idl',
- 'dns.idl',
- 'extensions_manifest_types.json',
- 'hid.idl',
- 'power.idl',
- 'runtime.json',
- 'serial.idl',
- 'socket.idl',
- 'sockets_tcp.idl',
- 'sockets_tcp_server.idl',
- 'sockets_udp.idl',
- 'storage.json',
- 'test.json',
- 'usb.idl',
- 'usb_private.idl',
- ],
- }, {
- # TODO: Eliminate these on Android. See crbug.com/305852.
- 'schema_files': [
- 'runtime.json',
- ],
- }],
- ],
- 'cc_dir': 'extensions/common/api',
- 'root_namespace': 'extensions::core_api::%(namespace)s',
- 'impl_dir': 'extensions/browser/api',
- },
- 'conditions': [
- ['enable_extensions==1', {
- 'dependencies': [
- '<(DEPTH)/device/serial/serial.gyp:device_serial',
- '<(DEPTH)/skia/skia.gyp:skia',
- ],
- }],
+ 'schemas.gypi',
],
},
],
diff --git a/extensions/common/api/schemas.gni b/extensions/common/api/schemas.gni
new file mode 100644
index 0000000..2227b71
--- /dev/null
+++ b/extensions/common/api/schemas.gni
@@ -0,0 +1,17 @@
+# 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.
+
+gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("schemas.gypi") ],
+ "scope",
+ [ "schemas.gypi" ])
+
+if (is_android) {
+ sources = gypi_values.android_schema_files
+} else {
+ sources = gypi_values.main_schema_files
+}
+
+root_namespace = "extensions::core_api::%(namespace)s"
diff --git a/extensions/common/api/schemas.gypi b/extensions/common/api/schemas.gypi
new file mode 100644
index 0000000..e595e5d
--- /dev/null
+++ b/extensions/common/api/schemas.gypi
@@ -0,0 +1,51 @@
+# 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.
+
+{
+ 'sources': [
+ '<@(schema_files)',
+ ],
+ 'variables': {
+ 'chromium_code': 1,
+ # TODO: Eliminate these on Android. See crbug.com/305852.
+ 'android_schema_files': [
+ 'runtime.json',
+ ],
+ 'main_schema_files': [
+ 'app_runtime.idl',
+ 'app_view_internal.json',
+ 'cast_channel.idl',
+ 'dns.idl',
+ 'extensions_manifest_types.json',
+ 'hid.idl',
+ 'power.idl',
+ 'runtime.json',
+ 'serial.idl',
+ 'socket.idl',
+ 'sockets_tcp.idl',
+ 'sockets_tcp_server.idl',
+ 'sockets_udp.idl',
+ 'storage.json',
+ 'test.json',
+ 'usb.idl',
+ 'usb_private.idl',
+ ],
+ 'non_compiled_schema_files': [
+ ],
+ 'conditions': [
+ ['enable_extensions==1', {
+ 'schema_files': [
+ '<@(main_schema_files)',
+ ],
+ }, {
+ 'schema_files': [
+ '<@(android_schema_files)',
+ ],
+ }],
+ ],
+ 'cc_dir': 'extensions/common/api',
+ 'root_namespace': 'extensions::core_api::%(namespace)s',
+ 'impl_dir_': 'extensions/browser/api',
+ },
+}