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

Side by Side Diff: chrome/common/extensions/api/declarative_content.json

Issue 2257003002: [Extensions] Generate all schema resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "declarativeContent", 7 "namespace": "declarativeContent",
8 "description": "Use the <code>chrome.declarativeContent</code> API to take a ctions depending on the content of a page, without requiring permission to read the page's content.", 8 "description": "Use the <code>chrome.declarativeContent</code> API to take a ctions depending on the content of a page, without requiring permission to read the page's content.",
9 "types": [ 9 "types": [
10 { 10 {
11 "id": "ImageDataType", 11 "id": "ImageDataType",
12 "type": "binary", 12 "type": "binary",
13 "isInstanceOf": "ImageData", 13 "isInstanceOf": "ImageData",
14 "additionalProperties": { "type": "any" }, 14 "additionalProperties": { "type": "any" },
15 "description": "See <a href=\"https://developer.mozilla.org/en-US/docs/W eb/API/ImageData\">https://developer.mozilla.org/en-US/docs/Web/API/ImageData</a >.", 15 "description": "See <a href=\"https://developer.mozilla.org/en-US/docs/W eb/API/ImageData\">https://developer.mozilla.org/en-US/docs/Web/API/ImageData</a >.",
16 "inline_doc": true 16 "inline_doc": true
17 }, 17 },
18 { 18 {
19 "id": "PageStateMatcherInstanceType",
20 "type": "string",
21 "enum": ["declarativeContent.PageStateMatcher"]
22 },
23 {
24 "id": "ShowPageActionInstanceType",
25 "type": "string",
26 "enum": ["declarativeContent.ShowPageAction"]
27 },
28 {
29 "id": "SetIconInstanceType",
30 "type": "string",
31 "enum": ["declarativeContent.SetIcon"]
32 },
33 {
34 "id": "RequestContentScriptInstanceType",
35 "type": "string",
36 "enum": ["declarativeContent.RequestContentScript"]
37 },
38 {
19 "id": "PageStateMatcher", 39 "id": "PageStateMatcher",
20 "type": "object", 40 "type": "object",
21 "description": "Matches the state of a web page by various criteria.", 41 "description": "Matches the state of a web page by various criteria.",
22 "properties": { 42 "properties": {
23 "pageUrl": { 43 "pageUrl": {
24 "$ref": "events.UrlFilter", 44 "$ref": "events.UrlFilter",
25 "description": "Matches if the condition of the UrlFilter are fulfil led for the top-level URL of the page.", 45 "description": "Matches if the condition of the UrlFilter are fulfil led for the top-level URL of the page.",
26 "optional": true 46 "optional": true
27 }, 47 },
28 "css": { 48 "css": {
(...skipping 10 matching lines...) Expand all
39 // "optional": true, 59 // "optional": true,
40 // "description": "Matches if all of the regular expressions in the a rray match text in the page. The regular expressions use the <a href=\"https://g ithub.com/google/re2/blob/master/doc/syntax.txt\">RE2 syntax</a>.", 60 // "description": "Matches if all of the regular expressions in the a rray match text in the page. The regular expressions use the <a href=\"https://g ithub.com/google/re2/blob/master/doc/syntax.txt\">RE2 syntax</a>.",
41 // "items": { "type": "string" } 61 // "items": { "type": "string" }
42 }, 62 },
43 "isBookmarked": { 63 "isBookmarked": {
44 "type": "boolean", 64 "type": "boolean",
45 "description": "Matches if the bookmarked state of the page is equal to the specified value. Requres the <a href='declare_permissions'>bookmarks per mission</a>.", 65 "description": "Matches if the bookmarked state of the page is equal to the specified value. Requres the <a href='declare_permissions'>bookmarks per mission</a>.",
46 "optional": true 66 "optional": true
47 }, 67 },
48 "instanceType": { 68 "instanceType": {
49 "type": "string", "enum": ["declarativeContent.PageStateMatcher"], 69 "$ref": "PageStateMatcherInstanceType",
50 "nodoc": true 70 "nodoc": true
51 } 71 }
52 } 72 }
53 }, 73 },
54 { 74 {
55 "id": "ShowPageAction", 75 "id": "ShowPageAction",
56 "description": "Declarative event action that shows the extension's $(re f:pageAction page action) while the corresponding conditions are met. This acti on can be used without <a href=\"declare_permissions#host-permissions\">host per missions</a>, but the extension must have a page action. If the extension takes the <a href=\"activeTab.html\">activeTab</a> permission, a click on the page ac tion will grant access to the active tab.", 76 "description": "Declarative event action that shows the extension's $(re f:pageAction page action) while the corresponding conditions are met. This acti on can be used without <a href=\"declare_permissions#host-permissions\">host per missions</a>, but the extension must have a page action. If the extension takes the <a href=\"activeTab.html\">activeTab</a> permission, a click on the page ac tion will grant access to the active tab.",
57 "type": "object", 77 "type": "object",
58 "properties": { 78 "properties": {
59 "instanceType": { 79 "instanceType": {
60 "type": "string", "enum": ["declarativeContent.ShowPageAction"], 80 "$ref": "ShowPageActionInstanceType",
61 "nodoc": true 81 "nodoc": true
62 } 82 }
63 } 83 }
64 }, 84 },
65 { 85 {
66 "id": "SetIcon", 86 "id": "SetIcon",
67 "description": "Declarative event action that sets the n-<abbr title=\"d evice-independent pixel\">dip</abbr> square icon for the extension's $(ref:pageA ction page action) or $(ref:browserAction browser action) while the correspondin g conditions are met. This action can be used without <a href=\"declare_permiss ions.html#host-permissions\">host permissions</a>, but the extension must have page or browser action.<p>Exactly one of <code>imageData</code> or <code>path</c ode> must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in <code>imageData</code> is an<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageData\">ImageData</ a> object, for example from a <code>&lt;canvas></code> element, while the image representation in <code>path</code> is the path to an image file relative to he extension's manifest. If <code>scale</code> screen pixels fit into a device-ind ependent pixel, the <code>scale * n</code> icon will be used. If that scale is missing, another image will be resized to the needed size.", 87 "description": "Declarative event action that sets the n-<abbr title=\"d evice-independent pixel\">dip</abbr> square icon for the extension's $(ref:pageA ction page action) or $(ref:browserAction browser action) while the correspondin g conditions are met. This action can be used without <a href=\"declare_permiss ions.html#host-permissions\">host permissions</a>, but the extension must have page or browser action.<p>Exactly one of <code>imageData</code> or <code>path</c ode> must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in <code>imageData</code> is an<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageData\">ImageData</ a> object, for example from a <code>&lt;canvas></code> element, while the image representation in <code>path</code> is the path to an image file relative to he extension's manifest. If <code>scale</code> screen pixels fit into a device-ind ependent pixel, the <code>scale * n</code> icon will be used. If that scale is missing, another image will be resized to the needed size.",
68 "type": "object", 88 "type": "object",
69 "properties": { 89 "properties": {
70 "instanceType": { 90 "instanceType": {
71 "type": "string", "enum": ["declarativeContent.SetIcon"], 91 "$ref": "SetIconInstanceType",
72 "nodoc": true 92 "nodoc": true
73 }, 93 },
74 "imageData": { 94 "imageData": {
75 "choices": [ 95 "choices": [
76 { "$ref": "ImageDataType" }, 96 { "$ref": "ImageDataType" },
77 { 97 {
78 "type": "object", 98 "type": "object",
79 "additionalProperties": { "type": "any" } 99 "additionalProperties": { "type": "any" }
80 } 100 }
81 ], 101 ],
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 "type": "boolean", 136 "type": "boolean",
117 "optional": true, 137 "optional": true,
118 "description": "Whether the content script runs in all frames of the matching page, or only the top frame. Default is false." 138 "description": "Whether the content script runs in all frames of the matching page, or only the top frame. Default is false."
119 }, 139 },
120 "matchAboutBlank": { 140 "matchAboutBlank": {
121 "type": "boolean", 141 "type": "boolean",
122 "optional": true, 142 "optional": true,
123 "description": "Whether to insert the content script on about:blank and about:srcdoc. Default is false." 143 "description": "Whether to insert the content script on about:blank and about:srcdoc. Default is false."
124 }, 144 },
125 "instanceType": { 145 "instanceType": {
126 "type": "string", "enum": ["declarativeContent.RequestContentScript" ], 146 "$ref": "RequestContentScriptInstanceType",
127 "nodoc": true 147 "nodoc": true
128 } 148 }
129 } 149 }
130 } 150 }
131 ], 151 ],
132 "functions": [ 152 "functions": [
133 ], 153 ],
134 "events": [ 154 "events": [
135 { 155 {
136 "name": "onPageChanged", 156 "name": "onPageChanged",
137 "options": { 157 "options": {
138 "supportsListeners": false, 158 "supportsListeners": false,
139 "supportsRules": true, 159 "supportsRules": true,
140 "conditions": ["declarativeContent.PageStateMatcher"], 160 "conditions": ["declarativeContent.PageStateMatcher"],
141 "actions": [ 161 "actions": [
142 "declarativeContent.RequestContentScript", 162 "declarativeContent.RequestContentScript",
143 "declarativeContent.SetIcon", 163 "declarativeContent.SetIcon",
144 "declarativeContent.ShowPageAction" 164 "declarativeContent.ShowPageAction"
145 ] 165 ]
146 } 166 }
147 } 167 }
148 ] 168 ]
149 } 169 }
150 ] 170 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698