Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / api / wallpaper.json
blobfef422ad7c30cc2ecdd52f3cdb25e21af9ee1e50
1 // Copyright 2013 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":"wallpaper",
8     "compiler_options": {
9       "implemented_in": "chrome/browser/chromeos/extensions/wallpaper_api.h"
10     },
11     "description": "Use the <code>chrome.wallpaper</code> API to change the ChromeOS wallpaper.",
12     "types":
13     [
14       {
15         "id": "WallpaperLayout",
16         "type": "string",
17         "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED" ],
18         "description": "The supported wallpaper layouts."
19       }
20     ],
21     "functions": [
22     {
23       "name": "setWallpaper",
24       "type": "function",
25       "description": "Sets wallpaper to the image at <em>url</em> or <em>wallpaperData</em> with the specified <em>layout</em>",
26       "parameters": [
27         {
28           "name": "details",
29           "type": "object",
30           "properties": {
31             "data": {
32               "type": "binary",
33               "optional": true,
34               "description": "The jpeg or png encoded wallpaper image."
35             },
36             "url": {
37               "type": "string",
38               "optional": true,
39               "description": "The URL of the wallpaper to be set."
40             },
41             "layout": {
42               "$ref": "WallpaperLayout",
43               "description": "The supported wallpaper layouts."
44             },
45             "filename": {
46               "type": "string",
47               "description": "The file name of the saved wallpaper."
48             },
49             "thumbnail": {
50               "type": "boolean",
51               "optional": true,
52               "description": "True if a 128x60 thumbnail should be generated."
53             }
54           }
55         },
56         {
57           "type": "function",
58           "name": "callback",
59           "parameters": [
60             {
61               "type": "binary",
62               "optional": true,
63               "name": "thumbnail",
64               "description": "The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60."
65             }
66           ]
67         }
68       ]
69     }
70     ]
71   }