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

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

Issue 9403006: Extensions: run "custom bindings" v8-extensions in content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "storage", 3 "namespace": "storage",
4 "unprivileged": true,
4 "types": [ 5 "types": [
5 { 6 {
6 "id": "StorageChange", 7 "id": "StorageChange",
7 "type": "object", 8 "type": "object",
8 "properties": { 9 "properties": {
9 "oldValue": { 10 "oldValue": {
10 "type": "any", 11 "type": "any",
11 "description": "The old value of the item, if there was an old value .", 12 "description": "The old value of the item, if there was an old value .",
12 "optional": true 13 "optional": true
13 }, 14 },
14 "newValue": { 15 "newValue": {
15 "type": "any", 16 "type": "any",
16 "description": "The new value of the item, if there is a new value." , 17 "description": "The new value of the item, if there is a new value." ,
17 "optional": true 18 "optional": true
18 } 19 }
19 } 20 }
20 }, 21 },
21 { 22 {
22 "id": "StorageArea", 23 "id": "StorageArea",
23 "type": "object", 24 "type": "object",
24 "functions": [ 25 "functions": [
25 { 26 {
26 "name": "get", 27 "name": "get",
27 "unprivileged": true,
28 "type": "function", 28 "type": "function",
29 "description": "Gets one or more items from storage.", 29 "description": "Gets one or more items from storage.",
30 "parameters": [ 30 "parameters": [
31 { 31 {
32 "name": "keys", 32 "name": "keys",
33 "choices": [ 33 "choices": [
34 { "type": "string" }, 34 { "type": "string" },
35 { "type": "array", "items": { "type": "string" } }, 35 { "type": "array", "items": { "type": "string" } },
36 { 36 {
37 "type": "object", 37 "type": "object",
(...skipping 16 matching lines...) Expand all
54 "properties": {}, 54 "properties": {},
55 "additionalProperties": { "type": "any" }, 55 "additionalProperties": { "type": "any" },
56 "description": "Object with items in their key-value mapping s." 56 "description": "Object with items in their key-value mapping s."
57 } 57 }
58 ] 58 ]
59 } 59 }
60 ] 60 ]
61 }, 61 },
62 { 62 {
63 "name": "getBytesInUse", 63 "name": "getBytesInUse",
64 "unprivileged": true,
65 "type": "function", 64 "type": "function",
66 "description": "Gets the amount of space (in bytes) being used by on e or more items.", 65 "description": "Gets the amount of space (in bytes) being used by on e or more items.",
67 "parameters": [ 66 "parameters": [
68 { 67 {
69 "name": "keys", 68 "name": "keys",
70 "choices": [ 69 "choices": [
71 { "type": "string" }, 70 { "type": "string" },
72 { "type": "array", "items": { "type": "string" } } 71 { "type": "array", "items": { "type": "string" } }
73 ], 72 ],
74 "description": "A single key or list of keys to get the total us age for. An empty list will return 0. Pass in <code>null</code> to get the total usage of all of storage.", 73 "description": "A single key or list of keys to get the total us age for. An empty list will return 0. Pass in <code>null</code> to get the total usage of all of storage.",
75 "optional": true 74 "optional": true
76 }, 75 },
77 { 76 {
78 "name": "callback", 77 "name": "callback",
79 "type": "function", 78 "type": "function",
80 "description": "Callback with the amount of space being used by storage, or on failure (in which case lastError will be set).", 79 "description": "Callback with the amount of space being used by storage, or on failure (in which case lastError will be set).",
81 "parameters": [ 80 "parameters": [
82 { 81 {
83 "name": "bytesInUse", 82 "name": "bytesInUse",
84 "type": "integer", 83 "type": "integer",
85 "description": "Amount of space being used in storage, in by tes." 84 "description": "Amount of space being used in storage, in by tes."
86 } 85 }
87 ] 86 ]
88 } 87 }
89 ] 88 ]
90 }, 89 },
91 { 90 {
92 "name": "set", 91 "name": "set",
93 "unprivileged": true,
94 "type": "function", 92 "type": "function",
95 "description": "Sets multiple items.", 93 "description": "Sets multiple items.",
96 "parameters": [ 94 "parameters": [
97 { 95 {
98 "name": "items", 96 "name": "items",
99 "type": "object", 97 "type": "object",
100 "properties": {}, 98 "properties": {},
101 "additionalProperties": { "type": "any" }, 99 "additionalProperties": { "type": "any" },
102 "description": "Object specifying items to augment storage with. Values that cannot be serialized (functions, etc) will be ignored." 100 "description": "Object specifying items to augment storage with. Values that cannot be serialized (functions, etc) will be ignored."
103 }, 101 },
104 { 102 {
105 "name": "callback", 103 "name": "callback",
106 "type": "function", 104 "type": "function",
107 "description": "Callback on success, or on failure (in which cas e lastError will be set).", 105 "description": "Callback on success, or on failure (in which cas e lastError will be set).",
108 "parameters": [], 106 "parameters": [],
109 "optional": true 107 "optional": true
110 } 108 }
111 ] 109 ]
112 }, 110 },
113 { 111 {
114 "name": "remove", 112 "name": "remove",
115 "unprivileged": true,
116 "type": "function", 113 "type": "function",
117 "description": "Removes one or more items from storage.", 114 "description": "Removes one or more items from storage.",
118 "parameters": [ 115 "parameters": [
119 { 116 {
120 "name": "keys", 117 "name": "keys",
121 "choices": [ 118 "choices": [
122 {"type": "string"}, 119 {"type": "string"},
123 {"type": "array", "items": {"type": "string"}, "minItems": 1} 120 {"type": "array", "items": {"type": "string"}, "minItems": 1}
124 ], 121 ],
125 "description": "A single key or a list of keys for items to remo ve." 122 "description": "A single key or a list of keys for items to remo ve."
126 }, 123 },
127 { 124 {
128 "name": "callback", 125 "name": "callback",
129 "type": "function", 126 "type": "function",
130 "description": "Callback on success, or on failure (in which cas e lastError will be set).", 127 "description": "Callback on success, or on failure (in which cas e lastError will be set).",
131 "parameters": [], 128 "parameters": [],
132 "optional": true 129 "optional": true
133 } 130 }
134 ] 131 ]
135 }, 132 },
136 { 133 {
137 "name": "clear", 134 "name": "clear",
138 "unprivileged": true,
139 "type": "function", 135 "type": "function",
140 "description": "Removes all items from storage.", 136 "description": "Removes all items from storage.",
141 "parameters": [ 137 "parameters": [
142 { 138 {
143 "name": "callback", 139 "name": "callback",
144 "type": "function", 140 "type": "function",
145 "description": "Callback on success, or on failure (in which cas e lastError will be set).", 141 "description": "Callback on success, or on failure (in which cas e lastError will be set).",
146 "parameters": [], 142 "parameters": [],
147 "optional": true 143 "optional": true
148 } 144 }
149 ] 145 ]
150 } 146 }
151 ] 147 ]
152 } 148 }
153 ], 149 ],
154 "events": [ 150 "events": [
155 { 151 {
156 "name": "onChanged", 152 "name": "onChanged",
157 "unprivileged": true,
158 "type": "function", 153 "type": "function",
159 "description": "Fired when one or more items change.", 154 "description": "Fired when one or more items change.",
160 "parameters": [ 155 "parameters": [
161 { 156 {
162 "name": "changes", 157 "name": "changes",
163 "type": "object", 158 "type": "object",
164 "properties": {}, 159 "properties": {},
165 "additionalProperties": { "$ref": "StorageChange" }, 160 "additionalProperties": { "$ref": "StorageChange" },
166 "description": "Object mapping each key that changed to its correspo nding <a href='#type-StorageChange'>StorageChange</a> for that item." 161 "description": "Object mapping each key that changed to its correspo nding <a href='#type-StorageChange'>StorageChange</a> for that item."
167 }, 162 },
168 { 163 {
169 "name": "namespace", 164 "name": "namespace",
170 "type": "string", 165 "type": "string",
171 "description": "The namespace (\"sync\" or \"local\") of the storage area the changes are for." 166 "description": "The namespace (\"sync\" or \"local\") of the storage area the changes are for."
172 } 167 }
173 ] 168 ]
174 } 169 }
175 ], 170 ],
176 "properties": { 171 "properties": {
177 "sync": { 172 "sync": {
178 "$ref": "StorageArea", 173 "$ref": "StorageArea",
179 "description": "Items under the \"sync\" namespace are synced using Chro me Sync.", 174 "description": "Items under the \"sync\" namespace are synced using Chro me Sync.",
180 "unprivileged": true,
181 "value": [ "sync" ], 175 "value": [ "sync" ],
182 "properties": { 176 "properties": {
183 "QUOTA_BYTES": { 177 "QUOTA_BYTES": {
184 "type": "integer", 178 "type": "integer",
185 "value": "102400", 179 "value": "102400",
186 "unprivileged": true,
187 "description": "The maximum total amount (in bytes) of data that can be stored in sync storage." 180 "description": "The maximum total amount (in bytes) of data that can be stored in sync storage."
188 }, 181 },
189 "QUOTA_BYTES_PER_ITEM": { 182 "QUOTA_BYTES_PER_ITEM": {
190 "type": "integer", 183 "type": "integer",
191 "value": "2048", 184 "value": "2048",
192 "unprivileged": true,
193 "description": "The maximum size (in bytes) of each individual item in sync storage." 185 "description": "The maximum size (in bytes) of each individual item in sync storage."
194 }, 186 },
195 "MAX_ITEMS": { 187 "MAX_ITEMS": {
196 "type": "integer", 188 "type": "integer",
197 "value": "512", 189 "value": "512",
198 "unprivileged": true,
199 "description": "The maximum number of items that can be stored in sy nc storage." 190 "description": "The maximum number of items that can be stored in sy nc storage."
200 } 191 }
201 } 192 }
202 }, 193 },
203 "local": { 194 "local": {
204 "$ref": "StorageArea", 195 "$ref": "StorageArea",
205 "description": "Items under the \"local\" namespace are local to each ma chine.", 196 "description": "Items under the \"local\" namespace are local to each ma chine.",
206 "unprivileged": true,
207 "value": [ "local" ], 197 "value": [ "local" ],
208 "properties": { 198 "properties": {
209 "QUOTA_BYTES": { 199 "QUOTA_BYTES": {
210 "type": "integer", 200 "type": "integer",
211 "value": "5120000", 201 "value": "5120000",
212 "unprivileged": true,
213 "description": "The maximum amount (in bytes) of data that can be st ored in local storage. This value may be ignored if the extension has the <code> unlimitedStorage</code> permission." 202 "description": "The maximum amount (in bytes) of data that can be st ored in local storage. This value may be ignored if the extension has the <code> unlimitedStorage</code> permission."
214 } 203 }
215 } 204 }
216 } 205 }
217 } 206 }
218 } 207 }
219 ] 208 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698