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