Browse Source

chore: update `_api_features` manifest requirements (#39412)

chore: update api_resources manifest requirements
Shelley Vohr 1 year ago
parent
commit
70508b5273

+ 11 - 1
shell/common/extensions/api/_api_features.json

@@ -4,6 +4,15 @@
     "extension_types": ["extension"],
     "contexts": ["blessed_extension"]
   },
+  "tabs.executeScript": {
+    "max_manifest_version": 2
+  },
+  "tabs.insertCSS": {
+    "max_manifest_version": 2
+  },
+  "tabs.removeCSS": {
+    "max_manifest_version": 2
+  },
   "extension": {
     "channel": "stable",
     "extension_types": ["extension"],
@@ -14,7 +23,8 @@
     "disallow_for_service_workers": true
   },
   "extension.getURL": {
-    "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
+    "contexts": ["blessed_extension", "unblessed_extension", "content_script"],
+    "max_manifest_version": 2
   },
   "i18n": {
     "channel": "stable",

+ 4 - 4
shell/common/extensions/api/resources_private.idl

@@ -1,4 +1,4 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -15,9 +15,9 @@ namespace resourcesPrivate {
     // chrome/browser/extensions/api/resources_private/resources_private_api.cc
     // for instructions on adding a new component to this API.
     //
-    // |component| : Internal chrome component to get strings for.
+    // |component| : Internal Chrome component to get strings for.
     // |callback| : Called with a dictionary mapping names to strings.
-    static void getStrings(Component component,
-                           GetStringsCallback callback);
+    [supportsPromises] static void getStrings(Component component,
+                                              GetStringsCallback callback);
   };
 };