Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5213)

Unified Diff: chrome/common/extensions/api/tabs.json

Issue 10815028: Make ActiveTabPermissionManager also grant the tabs permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/tabs.json
diff --git a/chrome/common/extensions/api/tabs.json b/chrome/common/extensions/api/tabs.json
index ccf137aef024ada0304f2e4e8785d0a7d4531227..3ddee7ba3ba003aeb567d3961c7a63736a1907ce 100644
--- a/chrome/common/extensions/api/tabs.json
+++ b/chrome/common/extensions/api/tabs.json
@@ -25,6 +25,22 @@
"status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
"incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}
}
+ },
+ {
+ "id": "InjectDetails",
+ "type": "object",
+ "description": "Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.",
+ "properties": {
+ "code": {"type": "string", "optional": true, "description": "JavaScript or CSS code to execute."},
+ "file": {"type": "string", "optional": true, "description": "JavaScript or CSS file to execute."},
+ "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects the script into all frames of current page. By default, it's false and the script is injected only into the top main frame."},
+ "runAt": {
+ "type": "string",
+ "optional": true,
+ "enum": ["document_start", "document_end", "document_idle"],
+ "description": "The soonest that the script will be injected into the tab. Defaults to \"document_idle\"."
+ }
+ }
}
],
"functions": [
@@ -600,20 +616,9 @@
"parameters": [
{"type": "integer", "name": "tabId", "optional": true, "description": "The ID of the tab in which to run the script; defaults to the active tab of the current window."},
{
- "type": "object",
+ "$ref": "tabs.InjectDetails",
"name": "details",
- "description": "Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.",
- "properties": {
- "code": {"type": "string", "optional": true, "description": "JavaScript code to execute."},
- "file": {"type": "string", "optional": true, "description": "JavaScript file to execute."},
- "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects script into all frames of current page. By default, it's false and script is injected only into the top main frame."},
- "runAt": {
- "type": "string",
- "optional": true,
- "enum": ["document_start", "document_end", "document_idle"],
- "description": "The soonest that the script will be injected into the tab. Defaults to \"document_idle\"."
- }
- }
+ "description": "Details of the script to run."
},
{
"type": "function",
@@ -639,20 +644,9 @@
"parameters": [
{"type": "integer", "name": "tabId", "optional": true, "description": "The ID of the tab in which to insert the CSS; defaults to the active tab of the current window."},
{
- "type": "object",
+ "$ref": "tabs.InjectDetails",
"name": "details",
- "description": "Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.",
- "properties": {
- "code": {"type": "string", "optional": true, "description": "CSS code to be injected."},
- "file": {"type": "string", "optional": true, "description": "CSS file to be injected."},
- "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects CSS text into all frames of current page. By default, it's false and CSS is injected only into the top main frame."},
- "runAt": {
- "type": "string",
- "optional": true,
- "enum": ["document_start", "document_end", "document_idle"],
- "description": "The soonest that the CSS will be injected into the tab. Defaults to \"document_idle\"."
- }
- }
+ "description": "Details of the CSS text to insert."
},
{
"type": "function",

Powered by Google App Engine
This is Rietveld 408576698