// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. [ { "namespace":"wallpaperPrivate", "compiler_options": { "implemented_in": "chrome/browser/chromeos/extensions/wallpaper_private_api.h" }, "platforms": ["chromeos"], "description": "none", "types": [ { "id": "WallpaperLayout", "type": "string", "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED" ] } ], "functions": [ { "name": "getStrings", "type": "function", "description": "Gets translated strings and initialization data.", "nodoc": "true", "parameters": [ { "type": "function", "name": "callback", "parameters": [ { "name": "result", "type": "object", "additionalProperties": {"type": "any"} } ] } ] }, { "name": "setWallpaperIfExists", "type": "function", "description": "Sets wallpaper if it exists in the local file system with specified layout", "nodoc": "true", "parameters": [ { "type": "string", "name": "url" }, { "name": "layout", "$ref": "WallpaperLayout" }, { "type": "function", "name": "callback", "parameters": [ { "type": "boolean", "name": "exists" } ] } ] }, { "name": "setWallpaper", "type": "function", "description": "Sets wallpaper to the image from url with specified layout", "nodoc": "true", "parameters": [ { "type": "binary", "name": "wallpaper" }, { "name": "layout", "$ref": "WallpaperLayout" }, { "type": "string", "name": "url" }, { "type": "function", "name": "callback", "parameters": [] } ] }, { "name": "resetWallpaper", "type": "function", "description": "Clears current user's active custom wallpaper and changes to default wallpaper.", "nodoc": "true", "parameters": [] }, { "name": "setCustomWallpaper", "type": "function", "description": "Sets wallpaper to the image from local file with specified layout and returns thumbnail if needed.", "nodoc": "true", "parameters": [ { "type": "binary", "name": "wallpaper" }, { "name": "layout", "$ref": "WallpaperLayout" }, { "type": "boolean", "name": "generateThumbnail", "description": "If true, callback should have a binary thumbnail." }, { "type": "string", "name": "fileName" }, { "type": "function", "name": "callback", "parameters": [ { "type": "binary", "optional": true, "name": "thumbnail" } ] } ] }, { "name": "setCustomWallpaperLayout", "type": "function", "description": "Sets current custom wallpaper to the specified layout", "nodoc": "true", "parameters": [ { "name": "layout", "$ref": "WallpaperLayout" }, { "type": "function", "name": "callback", "parameters": [] } ] }, { "name": "minimizeInactiveWindows", "type": "function", "description": "Minimizes all inactive open windows.", "nodoc": "true", "parameters": [] }, { "name": "restoreMinimizedWindows", "type": "function", "description": "Restores all previously minimized windows.", "nodoc": "true", "parameters": [] }, { "name": "getThumbnail", "type": "function", "description": "Gets thumbnail of wallpaper from thumbnail directory.", "nodoc": "true", "parameters": [ { "type": "string", "name": "urlOrFile", "description": "URL of ONLINE wallpaper or file name of CUSTOM wallpaper" }, { "name": "source", "type": "string", "enum": [ "ONLINE", "OEM" ] }, { "type": "function", "name": "callback", "description": "Function called upon completion.", "parameters": [ { "type": "binary", "name": "data", "optional": true, "description": "The binary data of loaded thumbnail." } ] } ] }, { "name": "saveThumbnail", "type": "function", "description": "Saves thumbnail to thumbnail directory.", "nodoc": "true", "parameters": [ { "type": "string", "name": "url", "description": "Wallpaper url." }, { "type": "binary", "name": "data", "description": "The binary data of downloaded thumbnail." }, { "type": "function", "name": "callback", "description": "Function called upon completion.", "parameters": [], "optional": true } ] }, { "name": "getOfflineWallpaperList", "type": "function", "description": "Get the list of file names of downloaded wallpapers.", "nodoc": "true", "parameters": [ { "type": "function", "name": "callback", "description": "Function called upon completion.", "parameters": [ { "type": "array", "name": "results", "items": {"type": "string"} } ] } ] } ] } ]