OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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") |
| 6 import("//build/config/ui.gni") |
5 import("//build/json_schema_api.gni") | 7 import("//build/json_schema_api.gni") |
6 import("//tools/json_schema_compiler/json_features.gni") | 8 import("//tools/json_schema_compiler/json_features.gni") |
7 import("schemas.gni") | |
8 | 9 |
9 assert(enable_extensions) | 10 assert(enable_extensions) |
10 | 11 |
| 12 schema_sources = [ |
| 13 "accessibility_features.json", |
| 14 "accessibility_private.json", |
| 15 "activity_log_private.json", |
| 16 "autofill_private.idl", |
| 17 "automation.idl", |
| 18 "automation_internal.idl", |
| 19 "autotest_private.idl", |
| 20 "bluetooth_low_energy.idl", |
| 21 "bookmark_manager_private.json", |
| 22 "bookmarks.json", |
| 23 "braille_display_private.idl", |
| 24 "browser.idl", |
| 25 "chrome_web_view_internal.json", |
| 26 "cloud_print_private.json", |
| 27 "command_line_private.json", |
| 28 "content_settings.json", |
| 29 "context_menus_internal.json", |
| 30 "context_menus.json", |
| 31 "cookies.json", |
| 32 "cryptotoken_private.idl", |
| 33 "dashboard_private.json", |
| 34 "data_reduction_proxy.json", |
| 35 "debugger.json", |
| 36 "desktop_capture.json", |
| 37 "developer_private.idl", |
| 38 "dial.idl", |
| 39 "downloads.idl", |
| 40 "downloads_internal.idl", |
| 41 "easy_unlock_private.idl", |
| 42 "experience_sampling_private.json", |
| 43 "feedback_private.idl", |
| 44 "file_system.idl", |
| 45 "font_settings.json", |
| 46 "gcm.json", |
| 47 "history.json", |
| 48 "hotword_private.idl", |
| 49 "i18n.json", |
| 50 "identity.idl", |
| 51 "identity_private.idl", |
| 52 "image_writer_private.idl", |
| 53 "inline_install_private.idl", |
| 54 "instance_id.json", |
| 55 "language_settings_private.idl", |
| 56 "manifest_types.json", |
| 57 "media_galleries.idl", |
| 58 "metrics_private.json", |
| 59 "notification_provider.idl", |
| 60 "notifications.idl", |
| 61 "omnibox.json", |
| 62 "page_capture.json", |
| 63 "passwords_private.idl", |
| 64 "permissions.json", |
| 65 "preferences_private.json", |
| 66 "quick_unlock_private.idl", |
| 67 "resources_private.idl", |
| 68 "screenlock_private.idl", |
| 69 "sessions.json", |
| 70 "settings_private.idl", |
| 71 "signed_in_devices.idl", |
| 72 "streams_private.idl", |
| 73 "sync_file_system.idl", |
| 74 "system_indicator.idl", |
| 75 "system_private.json", |
| 76 "tab_capture.idl", |
| 77 "tabs.json", |
| 78 "types.json", |
| 79 "web_navigation.json", |
| 80 |
| 81 # Despite the name, this API does not rely on any |
| 82 # WebRTC-specific bits and as such does not belong in |
| 83 # the enable_webrtc==0 section below. |
| 84 "webrtc_audio_private.idl", |
| 85 "webrtc_desktop_capture_private.idl", |
| 86 "webrtc_logging_private.idl", |
| 87 "webstore_private.json", |
| 88 "webstore_widget_private.idl", |
| 89 "windows.json", |
| 90 ] |
| 91 if (enable_task_manager) { |
| 92 schema_sources += [ "processes.idl" ] |
| 93 } |
| 94 if (is_chromeos) { |
| 95 schema_sources += [ |
| 96 "cast_devices_private.idl", |
| 97 "certificate_provider.idl", |
| 98 "certificate_provider_internal.idl", |
| 99 "echo_private.json", |
| 100 "enterprise_device_attributes.idl", |
| 101 "enterprise_platform_keys.idl", |
| 102 "enterprise_platform_keys_internal.idl", |
| 103 "enterprise_platform_keys_private.json", |
| 104 "file_browser_handler_internal.json", |
| 105 "file_manager_private.idl", |
| 106 "file_manager_private_internal.idl", |
| 107 "file_system_provider.idl", |
| 108 "file_system_provider_internal.idl", |
| 109 "first_run_private.json", |
| 110 "input_ime.json", |
| 111 "input_method_private.json", |
| 112 "launcher_search_provider.idl", |
| 113 "log_private.idl", |
| 114 "platform_keys.idl", |
| 115 "platform_keys_internal.idl", |
| 116 "terminal_private.json", |
| 117 "users_private.idl", |
| 118 "wallpaper.json", |
| 119 "wallpaper_private.json", |
| 120 ] |
| 121 } else if (is_linux || is_win) { |
| 122 schema_sources += [ "input_ime.json" ] |
| 123 } |
| 124 if (enable_service_discovery) { |
| 125 schema_sources += [ |
| 126 "gcd_private.idl", |
| 127 "mdns.idl", |
| 128 ] |
| 129 } |
| 130 if (enable_webrtc) { |
| 131 schema_sources += [ |
| 132 "cast_streaming_receiver_session.idl", |
| 133 "cast_streaming_rtp_stream.idl", |
| 134 "cast_streaming_session.idl", |
| 135 "cast_streaming_udp_transport.idl", |
| 136 ] |
| 137 } |
| 138 if (enable_app_list) { |
| 139 schema_sources += [ |
| 140 # TODO(tapted): Move this into chromeos_schema_files. |
| 141 "launcher_page.idl", |
| 142 ] |
| 143 } |
| 144 |
| 145 extensions_api_root_namespace = "extensions::api::%(namespace)s" |
| 146 |
| 147 extensions_api_uncompiled_sources = [ |
| 148 "browsing_data.json", |
| 149 "extension.json", |
| 150 "idltest.idl", |
| 151 "music_manager_private.idl", |
| 152 "top_sites.json", |
| 153 ] |
| 154 |
| 155 if (is_chromeos) { |
| 156 extensions_api_uncompiled_sources += [ |
| 157 "chromeos_info_private.json", |
| 158 "media_player_private.json", |
| 159 ] |
| 160 } |
| 161 |
| 162 extensions_api_schema_include_rules = |
| 163 "extensions/common/api:extensions::api::%(namespace)s" |
| 164 |
11 # GYP version: chrome/common/extensions/api/api.gyp:chrome_api | 165 # GYP version: chrome/common/extensions/api/api.gyp:chrome_api |
12 json_schema_api("api") { | 166 json_schema_api("api") { |
13 sources = schema_sources | 167 sources = schema_sources |
14 schemas = true | 168 schemas = true |
15 bundle = true | 169 bundle = true |
16 configs = [ "//build/config:precompiled_headers" ] | 170 configs = [ "//build/config:precompiled_headers" ] |
17 bundle_name = "Chrome" | 171 bundle_name = "Chrome" |
| 172 schema_include_rules = extensions_api_schema_include_rules |
18 | 173 |
19 deps = schema_dependencies | 174 uncompiled_bundle_schema_sources = [ |
| 175 "app.json", |
| 176 "browser_action.json", |
| 177 "commands.json", |
| 178 "declarative_content.json", |
| 179 "file_browser_handler.json", |
| 180 "page_action.json", |
| 181 "privacy.json", |
| 182 "proxy.json", |
| 183 "tts_engine.json", |
| 184 "tts.json", |
| 185 "types_private.json", |
| 186 "webstore.json", |
| 187 ] |
| 188 if (!is_chromeos) { |
| 189 # On ChromeOS, input_method_private is fully compiled (as part of |
| 190 # schema_files), and so gets added to the bundle already. On other |
| 191 # platforms, we still need it added to the bundle. |
| 192 # TODO(devlin): That's weird. Investigate. |
| 193 uncompiled_bundle_schema_sources += [ "input_method_private.json" ] |
| 194 } |
| 195 |
| 196 uncompiled_sources = extensions_api_uncompiled_sources |
| 197 |
| 198 root_namespace = extensions_api_root_namespace |
| 199 deps = [ |
| 200 "//extensions/common/api", |
| 201 ] |
20 } | 202 } |
21 | 203 |
22 # GYP version: chrome/browser/extensions/api/api.gyp:chrome_api_registration | 204 # GYP version: chrome/browser/extensions/api/api.gyp:chrome_api_registration |
23 json_schema_api("api_registration") { | 205 json_schema_api("api_registration") { |
24 sources = schema_sources | 206 sources = schema_sources |
25 impl_dir = "//chrome/browser/extensions/api" | 207 impl_dir = "//chrome/browser/extensions/api" |
26 bundle_registration = true | 208 bundle_registration = true |
27 configs = [ "//build/config:precompiled_headers" ] | 209 configs = [ "//build/config:precompiled_headers" ] |
28 bundle_name = "Chrome" | 210 bundle_name = "Chrome" |
| 211 root_namespace = extensions_api_root_namespace |
| 212 schema_include_rules = extensions_api_schema_include_rules |
| 213 |
| 214 uncompiled_sources = extensions_api_uncompiled_sources |
29 | 215 |
30 deps = [ | 216 deps = [ |
31 # Different APIs include headers from these targets. | 217 # Different APIs include headers from these targets. |
32 "//content/public/browser", | 218 "//content/public/browser", |
33 "//extensions/browser", | 219 "//extensions/browser", |
34 | 220 |
35 # Different APIs include some headers from chrome/common that in turn | 221 # Different APIs include some headers from chrome/common that in turn |
36 # include generated headers from these targets. | 222 # include generated headers from these targets. |
37 # TODO(brettw) this should be made unnecessary if possible. | 223 # TODO(brettw) this should be made unnecessary if possible. |
38 ":api", | 224 ":api", |
39 "//components/metrics/proto", | 225 "//components/metrics/proto", |
40 "//components/sync", | 226 "//components/sync", |
41 "//skia", | 227 "//skia", |
42 "//ui/accessibility:ax_gen", | 228 "//ui/accessibility:ax_gen", |
43 ] | 229 ] |
44 if (is_chromeos) { | 230 if (is_chromeos) { |
45 deps += [ "//components/drive:proto" ] | 231 deps += [ "//components/drive:proto" ] |
46 } | 232 } |
47 deps += schema_dependencies | 233 deps += [ "//extensions/common/api" ] |
48 } | 234 } |
49 | 235 |
50 json_features("api_features") { | 236 json_features("api_features") { |
51 feature_class = "APIFeature" | 237 feature_class = "APIFeature" |
52 provider_class = "APIFeatureProvider" | 238 provider_class = "APIFeatureProvider" |
53 sources = [ | 239 sources = [ |
54 "../../../../extensions/common/api/_api_features.json", | 240 "../../../../extensions/common/api/_api_features.json", |
55 "_api_features.json", | 241 "_api_features.json", |
56 ] | 242 ] |
57 } | 243 } |
(...skipping 25 matching lines...) Expand all Loading... |
83 } | 269 } |
84 | 270 |
85 group("extensions_features") { | 271 group("extensions_features") { |
86 public_deps = [ | 272 public_deps = [ |
87 ":api_features", | 273 ":api_features", |
88 ":behavior_features", | 274 ":behavior_features", |
89 ":manifest_features", | 275 ":manifest_features", |
90 ":permission_features", | 276 ":permission_features", |
91 ] | 277 ] |
92 } | 278 } |
OLD | NEW |