Skip to content

Commit

Permalink
fix: chrome.action API registration (#40514)
Browse files Browse the repository at this point in the history
* fix: chrome.action API registration

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: browser_action implemented_in

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed Nov 13, 2023
1 parent b92b4c8 commit 8eb6b35
Show file tree
Hide file tree
Showing 11 changed files with 536 additions and 1 deletion.
1 change: 1 addition & 0 deletions shell/browser/extensions/api/BUILD.gn
Expand Up @@ -11,6 +11,7 @@ assert(enable_extensions,

function_registration("api_registration") {
sources = [
"//electron/shell/common/extensions/api/action.json",
"//electron/shell/common/extensions/api/extension.json",
"//electron/shell/common/extensions/api/resources_private.idl",
"//electron/shell/common/extensions/api/scripting.idl",
Expand Down
1 change: 1 addition & 0 deletions shell/common/extensions/api/BUILD.gn
Expand Up @@ -38,6 +38,7 @@ group("extensions_features") {
generated_json_strings("generated_api_json_strings") {
sources = [
"action.json",
"browser_action.json",
"extension.json",
"resources_private.idl",
"scripting.idl",
Expand Down
13 changes: 13 additions & 0 deletions shell/common/extensions/api/_api_features.json
@@ -1,4 +1,17 @@
{
"action": {
"dependencies": ["manifest:action"],
"contexts": ["blessed_extension"]
},
"action.isEnabled": {
"channel": "stable"
},
"action.getBadgeTextColor": {
"channel": "stable"
},
"action.setBadgeTextColor": {
"channel": "stable"
},
"tabs": {
"channel": "stable",
"extension_types": ["extension"],
Expand Down
5 changes: 5 additions & 0 deletions shell/common/extensions/api/_manifest_features.json
Expand Up @@ -7,6 +7,11 @@
// well as feature.h, simple_feature.h, and feature_provider.h.

{
"action": {
"channel": "stable",
"extension_types": ["extension"],
"min_manifest_version": 3
},
"author": {
"channel": "stable",
"extension_types": "all"
Expand Down
2 changes: 1 addition & 1 deletion shell/common/extensions/api/action.json
Expand Up @@ -6,7 +6,7 @@
"namespace": "action",
"description": "Use the <code>chrome.action</code> API to control the extension's icon in the Google Chrome toolbar.",
"compiler_options": {
"implemented_in": "shell/browser/extensions/api/extension_action/extension_action_api.h"
"implemented_in": "electron/shell/browser/extensions/api/extension_action/extension_action_api.h"
},
"types": [
{
Expand Down

0 comments on commit 8eb6b35

Please sign in to comment.