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

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

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo multiplicity of registries and content watchers. Address code review comments. Created 6 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/declarative_content.json
diff --git a/chrome/common/extensions/api/declarative_content.json b/chrome/common/extensions/api/declarative_content.json
index 7c383b58e2488cde704d5bc0a362beb348feebd4..888cff7bdfae2107e6db2cf5a1fbff80f29d3cd5 100644
--- a/chrome/common/extensions/api/declarative_content.json
+++ b/chrome/common/extensions/api/declarative_content.json
@@ -48,6 +48,39 @@
"nodoc": true
}
}
+ },
+ {
+ "id": "RequestContentScript",
+ "description": "Declarative event action that injects a content script.",
+ "type": "object",
+ "properties": {
+ "css": {
+ "type": "array",
+ "optional": true,
+ "description": "Names of CSS files to be injected as a part of the content script.",
+ "items": { "type": "string" }
+ },
+ "js": {
+ "type": "array",
+ "optional": true,
+ "description": "Names of Javascript files to be injected as a part of the content script.",
+ "items": { "type": "string" }
+ },
+ "allFrames": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the content script runs in all frames of the matching page, or only the top frame. Default is false."
+ },
+ "matchAboutBlank": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether to insert the content script on about:blank and about:srcdoc. Default is false."
+ },
+ "instanceType": {
+ "type": "string", "enum": ["declarativeContent.RequestContentScript"],
+ "nodoc": true
+ }
+ }
}
],
"functions": [
@@ -60,6 +93,7 @@
"supportsRules": true,
"conditions": ["declarativeContent.PageStateMatcher"],
"actions": [
+ "declarativeContent.RequestContentScript",
"declarativeContent.ShowPageAction"
]
}

Powered by Google App Engine
This is Rietveld 408576698