| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 extensions_api_schema_files_ = [ |
| 6 import("//build/json_schema_api.gni") | |
| 7 import("//mojo/public/tools/bindings/mojom.gni") | |
| 8 | |
| 9 assert(enable_extensions) | |
| 10 | |
| 11 schema_files = [ | |
| 12 "alarms.idl", | 6 "alarms.idl", |
| 13 "app_current_window_internal.idl", | 7 "app_current_window_internal.idl", |
| 14 "app_runtime.idl", | 8 "app_runtime.idl", |
| 15 "app_view_guest_internal.json", | 9 "app_view_guest_internal.json", |
| 16 "app_window.idl", | 10 "app_window.idl", |
| 17 "audio.idl", | 11 "audio.idl", |
| 18 "bluetooth.idl", | 12 "bluetooth.idl", |
| 19 "bluetooth_low_energy.idl", | 13 "bluetooth_low_energy.idl", |
| 20 "bluetooth_private.idl", | 14 "bluetooth_private.idl", |
| 21 "bluetooth_socket.idl", | 15 "bluetooth_socket.idl", |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 "system_network.idl", | 48 "system_network.idl", |
| 55 "system_storage.idl", | 49 "system_storage.idl", |
| 56 "test.json", | 50 "test.json", |
| 57 "usb.idl", | 51 "usb.idl", |
| 58 "virtual_keyboard_private.json", | 52 "virtual_keyboard_private.json", |
| 59 "web_request.json", | 53 "web_request.json", |
| 60 "web_view_internal.json", | 54 "web_view_internal.json", |
| 61 ] | 55 ] |
| 62 | 56 |
| 63 if (is_chromeos) { | 57 if (is_chromeos) { |
| 64 schema_files += [ | 58 extensions_api_schema_files_ += [ |
| 65 "diagnostics.idl", | 59 "diagnostics.idl", |
| 66 "networking_config.idl", | 60 "networking_config.idl", |
| 67 "vpn_provider.idl", | 61 "vpn_provider.idl", |
| 68 "webcam_private.idl", | 62 "webcam_private.idl", |
| 69 ] | 63 ] |
| 70 } | 64 } |
| 71 | 65 |
| 72 uncompiled_sources = [ "web_request_internal.json" ] | 66 extensions_api_schema_files = |
| 67 get_path_info(extensions_api_schema_files_, "abspath") |
| 73 | 68 |
| 74 uncompiled_bundle_schema_sources = [ | 69 extensions_api_uncompiled_sources = |
| 75 "declarative_web_request.json", | 70 get_path_info([ "web_request_internal.json" ], "abspath") |
| 76 "web_view_request.json", | |
| 77 ] | |
| 78 | 71 |
| 79 root_namespace = "extensions::api::%(namespace)s" | 72 extensions_api_uncompiled_bundle_schema_sources = |
| 73 get_path_info([ |
| 74 "declarative_web_request.json", |
| 75 "web_view_request.json", |
| 76 ], |
| 77 "abspath") |
| 80 | 78 |
| 81 json_schema_api("generated_api") { | 79 extensions_api_root_namespace = "extensions::api::%(namespace)s" |
| 82 sources = schema_files | |
| 83 schemas = true | |
| 84 bundle = true | |
| 85 bundle_name = "" | |
| 86 | |
| 87 # Inherit uncompiled_sources, uncompiled_bundle_schema_sources, and | |
| 88 # root_namespace. | |
| 89 } | |
| 90 | |
| 91 mojom("mojom") { | |
| 92 sources = [ | |
| 93 "mime_handler.mojom", | |
| 94 ] | |
| 95 | |
| 96 use_new_wrapper_types = false | |
| 97 } | |
| 98 | |
| 99 group("api") { | |
| 100 public_deps = [ | |
| 101 ":generated_api", | |
| 102 ":mojom", | |
| 103 ] | |
| 104 } | |
| 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 |