Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / wallpaper_private.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":"wallpaperPrivate",
8     "compiler_options": {
9       "implemented_in": "chrome/browser/chromeos/extensions/wallpaper_private_api.h"
10     },
11     "platforms": ["chromeos"],
12     "description": "none",
13     "types": [
14       {
15         "id": "WallpaperLayout",
16         "type": "string",
17         "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED" ]
18       }
19     ],
20     "functions": [
21       {
22         "name": "getStrings",
23         "type": "function",
24         "description": "Gets translated strings and initialization data.",
25         "nodoc": "true",
26         "parameters": [
27           {
28             "type": "function",
29             "name": "callback",
30             "parameters": [
31               {
32                 "name": "result",
33                 "type": "object",
34                 "additionalProperties": {"type": "any"}
35               }
36             ]
37           }
38         ]
39       },
40       {
41         "name": "getSyncSetting",
42         "type": "function",
43         "description": "Gets the sync themes(and wallpaper on ChromeOS) setting value.",
44         "nodoc": "true",
45         "parameters": [
46           {
47             "type": "function",
48             "name": "callback",
49             "parameters": [
50               {
51                 "name": "result",
52                 "type": "object",
53                 "additionalProperties": {"type": "any"}
54               }
55             ]
56           }
57         ]
58       },
59       {
60         "name": "setWallpaperIfExists",
61         "type": "function",
62         "description": "Sets wallpaper if it exists in the local file system with specified layout",
63         "nodoc": "true",
64         "parameters": [
65           {
66             "type": "string",
67             "name": "url"
68           },
69           {
70             "name": "layout",
71             "$ref": "WallpaperLayout"
72           },
73           {
74             "type": "function",
75             "name": "callback",
76             "parameters": [
77               {
78                 "type": "boolean",
79                 "name": "exists"
80               }
81             ]
82           }
83         ]
84       },
85       {
86         "name": "setWallpaper",
87         "type": "function",
88         "description": "Sets wallpaper to the image from url with specified layout",
89         "nodoc": "true",
90         "parameters": [
91           {
92             "type": "binary",
93             "name": "wallpaper"
94           },
95           {
96             "name": "layout",
97             "$ref": "WallpaperLayout"
98           },
99           {
100             "type": "string",
101             "name": "url"
102           },
103           {
104             "type": "function",
105             "name": "callback",
106             "parameters": []
107           }
108         ]
109       },
110       {
111         "name": "resetWallpaper",
112         "type": "function",
113         "description": "Clears current user's active custom wallpaper and changes to default wallpaper.",
114         "nodoc": "true",
115         "parameters": []
116       },
117       {
118         "name": "setCustomWallpaper",
119         "type": "function",
120         "description": "Sets wallpaper to the image from local file with specified layout and returns thumbnail if needed.",
121         "nodoc": "true",
122         "parameters": [
123           {
124             "type": "binary",
125             "name": "wallpaper"
126           },
127           {
128             "name": "layout",
129             "$ref": "WallpaperLayout"
130           },
131           {
132             "type": "boolean",
133             "name": "generateThumbnail",
134             "description": "If true, callback should have a binary thumbnail."
135           },
136           {
137             "type": "string",
138             "name": "fileName"
139           },
140           {
141             "type": "function",
142             "name": "callback",
143             "parameters": [
144               {
145                 "type": "binary",
146                 "optional": true,
147                 "name": "thumbnail"
148               }
149             ]
150           }
151         ]
152       },
153       {
154         "name": "setCustomWallpaperLayout",
155         "type": "function",
156         "description": "Sets current custom wallpaper to the specified layout",
157         "nodoc": "true",
158         "parameters": [
159           {
160             "name": "layout",
161             "$ref": "WallpaperLayout"
162           },
163           {
164             "type": "function",
165             "name": "callback",
166             "parameters": []
167           }
168         ]
169       },
170       {
171         "name": "minimizeInactiveWindows",
172         "type": "function",
173         "description": "Minimizes all inactive open windows.",
174         "nodoc": "true",
175         "parameters": []
176       },
177       {
178         "name": "restoreMinimizedWindows",
179         "type": "function",
180         "description": "Restores all previously minimized windows.",
181         "nodoc": "true",
182         "parameters": []
183       },
184       {
185         "name": "getThumbnail",
186         "type": "function",
187         "description": "Gets thumbnail of wallpaper from thumbnail directory.",
188         "nodoc": "true",
189         "parameters": [
190           {
191             "type": "string",
192             "name": "urlOrFile",
193             "description": "URL of ONLINE wallpaper or file name of CUSTOM wallpaper"
194           },
195           {
196             "name": "source",
197             "type": "string",
198             "enum": [ "ONLINE", "OEM" ]
199           },
200           {
201             "type": "function",
202             "name": "callback",
203             "description": "Function called upon completion.",
204             "parameters": [
205               {
206                 "type": "binary",
207                 "name": "data",
208                 "optional": true,
209                 "description": "The binary data of loaded thumbnail."
210               }
211             ]
212           }
213         ]
214       },
215       {
216         "name": "saveThumbnail",
217         "type": "function",
218         "description": "Saves thumbnail to thumbnail directory.",
219         "nodoc": "true",
220         "parameters": [
221           {
222             "type": "string",
223             "name": "url",
224             "description": "Wallpaper url."
225           },
226           {
227             "type": "binary",
228             "name": "data",
229             "description": "The binary data of downloaded thumbnail."
230           },
231           {
232             "type": "function",
233             "name": "callback",
234             "description": "Function called upon completion.",
235             "parameters": [],
236             "optional": true
237           }
238         ]
239       },
240       {
241         "name": "getOfflineWallpaperList",
242         "type": "function",
243         "description": "Get the list of file names of downloaded wallpapers.",
244         "nodoc": "true",
245         "parameters": [
246           {
247             "type": "function",
248             "name": "callback",
249             "description": "Function called upon completion.",
250             "parameters": [
251               {
252                 "type": "array",
253                 "name": "results",
254                 "items": {"type": "string"}
255               }
256             ]
257           }
258         ]
259       }
260     ]
261   }
262 ]