| Index: chrome/common/extensions/api/declarative_content.json
|
| diff --git a/chrome/common/extensions/api/declarative_content.json b/chrome/common/extensions/api/declarative_content.json
|
| index 7c383b58e2488cde704d5bc0a362beb348feebd4..07b4b42855863112b62b13ede4c9b411257c7449 100644
|
| --- a/chrome/common/extensions/api/declarative_content.json
|
| +++ b/chrome/common/extensions/api/declarative_content.json
|
| @@ -48,6 +48,52 @@
|
| "nodoc": true
|
| }
|
| }
|
| + },
|
| + {
|
| + "id": "ContentScript",
|
| + "description": "Declarative content script definition.",
|
| + "type": "object",
|
| + "properties": {
|
| + "css": {
|
| + "type": "array",
|
| + "optional": true,
|
| + "description": "Names of CSS files to be injected as a part of content script.",
|
| + "items": { "type": "string" }
|
| + },
|
| + "js": {
|
| + "type": "array",
|
| + "optional": true,
|
| + "description": "Names of Javascript files to be injected as a part of content script.",
|
| + "items": { "type": "string" }
|
| + },
|
| + "callback": {
|
| + "type": "function",
|
| + "optional": true,
|
| + "description": "Function to be called after content script injection attempt is complete."
|
| + },
|
| + "instanceType": {
|
| + "type": "string", "enum": ["declarativeContent.ContentScript"],
|
| + "nodoc": true
|
| + }
|
| + }
|
| + },
|
| + {
|
| + "id": "RequestContentScript",
|
| + "description": "Declarative event action that injects a content script.",
|
| + "type": "object",
|
| + "properties": {
|
| + "script": {
|
| + "$ref": "ContentScript"
|
| + },
|
| + "callback": {
|
| + "type": "function",
|
| + "optional": true
|
| + },
|
| + "instanceType": {
|
| + "type": "string", "enum": ["declarativeContent.RequestContentScript"],
|
| + "nodoc": true
|
| + }
|
| + }
|
| }
|
| ],
|
| "functions": [
|
| @@ -63,6 +109,39 @@
|
| "declarativeContent.ShowPageAction"
|
| ]
|
| }
|
| + },
|
| + {
|
| + "name": "onDocumentStart",
|
| + "options": {
|
| + "supportsListeners": false,
|
| + "supportsRules": true,
|
| + "conditions": ["declarativeContent.PageStateMatcher"],
|
| + "actions": [
|
| + "declarativeContent.RequestContentScript"
|
| + ]
|
| + }
|
| + },
|
| + {
|
| + "name": "onDocumentEnd",
|
| + "options": {
|
| + "supportsListeners": false,
|
| + "supportsRules": true,
|
| + "conditions": ["declarativeContent.PageStateMatcher"],
|
| + "actions": [
|
| + "declarativeContent.RequestContentScript"
|
| + ]
|
| + }
|
| + },
|
| + {
|
| + "name": "onDocumentIdle",
|
| + "options": {
|
| + "supportsListeners": false,
|
| + "supportsRules": true,
|
| + "conditions": ["declarativeContent.PageStateMatcher"],
|
| + "actions": [
|
| + "declarativeContent.RequestContentScript"
|
| + ]
|
| + }
|
| }
|
| ]
|
| }
|
|
|