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