OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/json_schema_api.gni") | 6 import("//build/json_schema_api.gni") |
| 7 import("//extensions/common/api/schema.gni") |
7 import("//mojo/public/tools/bindings/mojom.gni") | 8 import("//mojo/public/tools/bindings/mojom.gni") |
8 | 9 |
9 assert(enable_extensions) | 10 assert(enable_extensions) |
10 | 11 |
11 schema_files = [ | |
12 "alarms.idl", | |
13 "app_current_window_internal.idl", | |
14 "app_runtime.idl", | |
15 "app_view_guest_internal.json", | |
16 "app_window.idl", | |
17 "audio.idl", | |
18 "bluetooth.idl", | |
19 "bluetooth_low_energy.idl", | |
20 "bluetooth_private.idl", | |
21 "bluetooth_socket.idl", | |
22 "cast_channel.idl", | |
23 "clipboard.idl", | |
24 "document_scan.idl", | |
25 "display_source.idl", | |
26 "dns.idl", | |
27 "events.json", | |
28 "extensions_manifest_types.json", | |
29 "extension_options_internal.idl", | |
30 "extension_view_internal.json", | |
31 "extension_types.json", | |
32 "guest_view_internal.json", | |
33 "management.json", | |
34 "hid.idl", | |
35 "idle.json", | |
36 "metrics_private.json", | |
37 "mime_handler_private.idl", | |
38 "mime_handler_view_guest_internal.json", | |
39 "mojo_private.idl", | |
40 "networking_private.idl", | |
41 "power.idl", | |
42 "printer_provider.idl", | |
43 "printer_provider_internal.idl", | |
44 "runtime.json", | |
45 "serial.idl", | |
46 "socket.idl", | |
47 "sockets_tcp.idl", | |
48 "sockets_tcp_server.idl", | |
49 "sockets_udp.idl", | |
50 "storage.json", | |
51 "system_cpu.idl", | |
52 "system_display.idl", | |
53 "system_memory.idl", | |
54 "system_network.idl", | |
55 "system_storage.idl", | |
56 "test.json", | |
57 "usb.idl", | |
58 "virtual_keyboard_private.json", | |
59 "web_request.json", | |
60 "web_view_internal.json", | |
61 ] | |
62 | |
63 if (is_chromeos) { | |
64 schema_files += [ | |
65 "diagnostics.idl", | |
66 "networking_config.idl", | |
67 "vpn_provider.idl", | |
68 "webcam_private.idl", | |
69 ] | |
70 } | |
71 | |
72 uncompiled_sources = [ "web_request_internal.json" ] | |
73 | |
74 uncompiled_bundle_schema_sources = [ | |
75 "declarative_web_request.json", | |
76 "web_view_request.json", | |
77 ] | |
78 | |
79 root_namespace = "extensions::api::%(namespace)s" | |
80 | |
81 json_schema_api("generated_api") { | 12 json_schema_api("generated_api") { |
82 sources = schema_files | 13 sources = extensions_api_schema_files |
83 schemas = true | 14 schemas = true |
84 bundle = true | 15 bundle = true |
85 bundle_name = "" | 16 bundle_name = "" |
86 | 17 root_namespace = extensions_api_root_namespace |
87 # Inherit uncompiled_sources, uncompiled_bundle_schema_sources, and | 18 uncompiled_sources = extensions_api_uncompiled_sources |
88 # root_namespace. | 19 uncompiled_bundle_schema_sources = |
| 20 extensions_api_uncompiled_bundle_schema_sources |
89 } | 21 } |
90 | 22 |
91 mojom("mojom") { | 23 mojom("mojom") { |
92 sources = [ | 24 sources = [ |
93 "mime_handler.mojom", | 25 "mime_handler.mojom", |
94 ] | 26 ] |
95 | 27 |
96 use_new_wrapper_types = false | 28 use_new_wrapper_types = false |
97 } | 29 } |
98 | 30 |
99 group("api") { | 31 group("api") { |
100 public_deps = [ | 32 public_deps = [ |
101 ":generated_api", | 33 ":generated_api", |
102 ":mojom", | 34 ":mojom", |
103 ] | 35 ] |
104 } | 36 } |
105 | |
106 json_schema_api("api_registration") { | |
107 sources = schema_files | |
108 impl_dir = "//extensions/browser/api" | |
109 bundle_registration = true | |
110 bundle_name = "" | |
111 | |
112 deps = [ | |
113 ":api", | |
114 "//device/serial", | |
115 "//extensions/common/api/cast_channel:cast_channel_proto", | |
116 "//skia", | |
117 ] | |
118 | |
119 # Inherit uncompiled_sources, uncompiled_bundle_schema_sources, and | |
120 # root_namespace. | |
121 } | |
OLD | NEW |