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