-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
201 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Resource ids starting at 31000 are reserved for projects built on Chromium. | ||
{ | ||
"SRCDIR": "../../..", | ||
"brave/common/extensions/api/brave_api_resources.grd": { | ||
"includes": [32000], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import("//tools/json_schema_compiler/json_features.gni") | ||
import("//tools/json_schema_compiler/json_schema_api.gni") | ||
import("//tools/grit/grit_rule.gni") | ||
json_features("api_features") { | ||
feature_type = "APIFeature" | ||
provider_class = "BraveAPIFeatureProvider" | ||
sources = [ | ||
"//chrome/common/extensions/api/_api_features.json", | ||
"//extensions/common/api/_api_features.json", | ||
"_api_features.json", | ||
] | ||
} | ||
|
||
json_features("permission_features") { | ||
feature_type = "PermissionFeature" | ||
provider_class = "BravePermissionFeatureProvider" | ||
sources = [ | ||
"//chrome/common/extensions/api/_permission_features.json", | ||
"//extensions/common/api/_permission_features.json", | ||
] | ||
} | ||
|
||
json_features("manifest_features") { | ||
feature_type = "ManifestFeature" | ||
provider_class = "BraveManifestFeatureProvider" | ||
sources = [ | ||
"//chrome/common/extensions/api/_manifest_features.json", | ||
"//extensions/common/api/_manifest_features.json", | ||
] | ||
} | ||
|
||
json_features("behavior_features") { | ||
feature_type = "BehaviorFeature" | ||
provider_class = "BraveBehaviorFeatureProvider" | ||
sources = [ | ||
"//extensions/common/api/_behavior_features.json", | ||
] | ||
} | ||
|
||
grit("resources") { | ||
source = "brave_api_resources.grd" | ||
outputs = [ | ||
"grit/brave_api_resources.h", | ||
"brave_api_resources.pak", | ||
] | ||
resource_ids = "//brave/browser/resources/resource_ids" | ||
} | ||
|
||
json_schema_api("generated_api") { | ||
sources = [ | ||
"brave_shields.json" | ||
] | ||
deps = [ | ||
"//chrome/common/extensions/api", | ||
"//extensions/common/api", | ||
":api_features", | ||
":permission_features", | ||
":manifest_features", | ||
":behavior_features", | ||
":resources", | ||
] | ||
root_namespace = "extensions::api::%(namespace)s" | ||
schemas = true | ||
bundle = true | ||
bundle_registration = true | ||
bundle_name = "Brave" | ||
impl_dir = "//brave/common/extensions/api" | ||
} | ||
|
||
group("api") { | ||
public_deps = [ | ||
":generated_api", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
{ | ||
"braveShields": { | ||
"channel": "stable", | ||
"dependencies": [], | ||
"contexts": ["blessed_extension"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<grit latest_public_release="0" current_release="1" output_all_resource_defines="false"> | ||
<outputs> | ||
<output filename="grit/brave_api_resources.h" type="rc_header"> | ||
<emit emit_type='prepend'></emit> | ||
</output> | ||
<output filename="brave_api_resources.pak" type="data_package" /> | ||
</outputs> | ||
<release seq="1"> | ||
<includes> | ||
<include name="IDR_BRAVE_EXTENSION_API_FEATURES" file="_api_features.json" type="BINDATA" /> | ||
</includes> | ||
</release> | ||
</grit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters