- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / browsing_data.json
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
3 // found in the LICENSE file.
4
5 [
6   {
7     "namespace": "browsingData",
8     "description": "Use the <code>chrome.browsingData</code> API to remove browsing data from a user's local profile.",
9     "types": [
10       {
11         "id": "RemovalOptions",
12         "type": "object",
13         "description": "Options that determine exactly what data will be removed.",
14         "properties": {
15           "since": {
16             "type": "number",
17             "optional": true,
18             "description": "Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the <code>getTime</code> method of the JavaScript <code>Date</code> object). If absent, defaults to 0 (which would remove all browsing data)."
19           },
20           "originTypes": {
21             "type": "object",
22             "optional": true,
23             "description": "An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only \"unprotected\" origins. Please ensure that you <em>really</em> want to remove application data before adding 'protectedWeb' or 'extensions'.",
24             "properties": {
25               "unprotectedWeb": {
26                 "type": "boolean",
27                 "optional": true,
28                 "description": "Normal websites."
29               },
30               "protectedWeb": {
31                 "type": "boolean",
32                 "optional": true,
33                 "description": "Websites that have been installed as hosted applications (be careful!)."
34               },
35               "extension": {
36                 "type": "boolean",
37                 "optional": true,
38                 "description": "Extensions and packaged applications a user has installed (be _really_ careful!)."
39               }
40             }
41           }
42         }
43       },
44       {
45         "id": "DataTypeSet",
46         "type": "object",
47         "description": "A set of data types. Missing data types are interpreted as <code>false</code>.",
48         "properties": {
49           "appcache": {
50             "type": "boolean",
51             "optional": true,
52             "description": "Websites' appcaches."
53           },
54           "cache": {
55             "type": "boolean",
56             "optional": true,
57             "description": "The browser's cache. Note: when removing data, this clears the <em>entire</em> cache: it is not limited to the range you specify."
58           },
59           "cookies": {
60             "type": "boolean",
61             "optional": true,
62             "description": "The browser's cookies."
63           },
64           "downloads": {
65             "type": "boolean",
66             "optional": true,
67             "description": "The browser's download list."
68           },
69           "fileSystems": {
70             "type": "boolean",
71             "optional": true,
72             "description": "Websites' file systems."
73           },
74           "formData": {
75             "type": "boolean",
76             "optional": true,
77             "description": "The browser's stored form data."
78           },
79           "history": {
80             "type": "boolean",
81             "optional": true,
82             "description": "The browser's history."
83           },
84           "indexedDB": {
85             "type": "boolean",
86             "optional": true,
87             "description": "Websites' IndexedDB data."
88           },
89           "localStorage": {
90             "type": "boolean",
91             "optional": true,
92             "description": "Websites' local storage data."
93           },
94           "serverBoundCertificates": {
95             "type": "boolean",
96             "optional": true,
97             "description": "Server-bound certificates."
98           },
99           "pluginData": {
100             "type": "boolean",
101             "optional": true,
102             "description": "Plugins' data."
103           },
104           "passwords": {
105             "type": "boolean",
106             "optional": true,
107             "description": "Stored passwords."
108           },
109           "webSQL": {
110             "type": "boolean",
111             "optional": true,
112             "description": "Websites' WebSQL data."
113           }
114         }
115       }
116     ],
117     "functions": [
118       {
119         "name": "settings",
120         "description": "Reports which types of data are currently selected in the 'Clear browsing data' settings UI.  Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.",
121         "type": "function",
122         "parameters": [
123           {
124             "name": "callback",
125             "type": "function",
126             "parameters": [
127               {
128                 "name": "result",
129                 "type": "object",
130                 "properties": {
131                   "options": {
132                     "$ref": "RemovalOptions"
133                   },
134                   "dataToRemove": {
135                     "$ref": "DataTypeSet",
136                     "description": "All of the types will be present in the result, with values of <code>true</code> if they are both selected to be removed and permitted to be removed, otherwise <code>false</code>."
137                   },
138                   "dataRemovalPermitted": {
139                     "$ref": "DataTypeSet",
140                     "description": "All of the types will be present in the result, with values of <code>true</code> if they are permitted to be removed (e.g., by enterprise policy) and <code>false</code> if not."
141                   }
142                 }
143               }
144             ]
145           }
146         ]
147       },
148       {
149         "name": "remove",
150         "description": "Clears various types of browsing data stored in a user's profile.",
151         "type": "function",
152         "parameters": [
153           {
154             "$ref": "RemovalOptions",
155             "name": "options"
156           },
157           {
158             "name": "dataToRemove",
159             "$ref": "DataTypeSet",
160             "description": "The set of data types to remove."
161           },
162           {
163             "name": "callback",
164             "type": "function",
165             "description": "Called when deletion has completed.",
166             "optional": true,
167             "parameters": []
168           }
169         ]
170       },
171       {
172         "name": "removeAppcache",
173         "description": "Clears websites' appcache data.",
174         "type": "function",
175         "parameters": [
176           {
177             "$ref": "RemovalOptions",
178             "name": "options"
179           },
180           {
181             "name": "callback",
182             "type": "function",
183             "description": "Called when websites' appcache data has been cleared.",
184             "optional": true,
185             "parameters": []
186           }
187         ]
188       },
189       {
190         "name": "removeCache",
191         "description": "Clears the browser's cache.",
192         "type": "function",
193         "parameters": [
194           {
195             "$ref": "RemovalOptions",
196             "name": "options"
197           },
198           {
199             "name": "callback",
200             "type": "function",
201             "description": "Called when the browser's cache has been cleared.",
202             "optional": true,
203             "parameters": []
204           }
205         ]
206       },
207       {
208         "name": "removeCookies",
209         "description": "Clears the browser's cookies and server-bound certificates modified within a particular timeframe.",
210         "type": "function",
211         "parameters": [
212           {
213             "$ref": "RemovalOptions",
214             "name": "options"
215           },
216           {
217             "name": "callback",
218             "type": "function",
219             "description": "Called when the browser's cookies and server-bound certificates have been cleared.",
220             "optional": true,
221             "parameters": []
222           }
223         ]
224       },
225       {
226         "name": "removeDownloads",
227         "description": "Clears the browser's list of downloaded files (<em>not</em> the downloaded files themselves).",
228         "type": "function",
229         "parameters": [
230           {
231             "$ref": "RemovalOptions",
232             "name": "options"
233           },
234           {
235             "name": "callback",
236             "type": "function",
237             "description": "Called when the browser's list of downloaded files has been cleared.",
238             "optional": true,
239             "parameters": []
240           }
241         ]
242       },
243       {
244         "name": "removeFileSystems",
245         "description": "Clears websites' file system data.",
246         "type": "function",
247         "parameters": [
248           {
249             "$ref": "RemovalOptions",
250             "name": "options"
251           },
252           {
253             "name": "callback",
254             "type": "function",
255             "description": "Called when websites' file systems have been cleared.",
256             "optional": true,
257             "parameters": []
258           }
259         ]
260       },
261       {
262         "name": "removeFormData",
263         "description": "Clears the browser's stored form data (autofill).",
264         "type": "function",
265         "parameters": [
266           {
267             "$ref": "RemovalOptions",
268             "name": "options"
269           },
270           {
271             "name": "callback",
272             "type": "function",
273             "description": "Called when the browser's form data has been cleared.",
274             "optional": true,
275             "parameters": []
276           }
277         ]
278       },
279       {
280         "name": "removeHistory",
281         "description": "Clears the browser's history.",
282         "type": "function",
283         "parameters": [
284           {
285             "$ref": "RemovalOptions",
286             "name": "options"
287           },
288           {
289             "name": "callback",
290             "type": "function",
291             "description": "Called when the browser's history has cleared.",
292             "optional": true,
293             "parameters": []
294           }
295         ]
296       },
297       {
298         "name": "removeIndexedDB",
299         "description": "Clears websites' IndexedDB data.",
300         "type": "function",
301         "parameters": [
302           {
303             "$ref": "RemovalOptions",
304             "name": "options"
305           },
306           {
307             "name": "callback",
308             "type": "function",
309             "description": "Called when websites' IndexedDB data has been cleared.",
310             "optional": true,
311             "parameters": []
312           }
313         ]
314       },
315       {
316         "name": "removeLocalStorage",
317         "description": "Clears websites' local storage data.",
318         "type": "function",
319         "parameters": [
320           {
321             "$ref": "RemovalOptions",
322             "name": "options"
323           },
324           {
325             "name": "callback",
326             "type": "function",
327             "description": "Called when websites' local storage has been cleared.",
328             "optional": true,
329             "parameters": []
330           }
331         ]
332       },
333       {
334         "name": "removePluginData",
335         "description": "Clears plugins' data.",
336         "type": "function",
337         "parameters": [
338           {
339             "$ref": "RemovalOptions",
340             "name": "options"
341           },
342           {
343             "name": "callback",
344             "type": "function",
345             "description": "Called when plugins' data has been cleared.",
346             "optional": true,
347             "parameters": []
348           }
349         ]
350       },
351       {
352         "name": "removePasswords",
353         "description": "Clears the browser's stored passwords.",
354         "type": "function",
355         "parameters": [
356           {
357             "$ref": "RemovalOptions",
358             "name": "options"
359           },
360           {
361             "name": "callback",
362             "type": "function",
363             "description": "Called when the browser's passwords have been cleared.",
364             "optional": true,
365             "parameters": []
366           }
367         ]
368       },
369       {
370         "name": "removeWebSQL",
371         "description": "Clears websites' WebSQL data.",
372         "type": "function",
373         "parameters": [
374           {
375             "$ref": "RemovalOptions",
376             "name": "options"
377           },
378           {
379             "name": "callback",
380             "type": "function",
381             "description": "Called when websites' WebSQL databases have been cleared.",
382             "optional": true,
383             "parameters": []
384           }
385         ]
386       }
387     ]
388   }
389 ]