// 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"], "nodoc": "true", "functions": [ { "name": "getStrings", "type": "function", "description": "Gets translated strings.", "nodoc": "true", "parameters": [ { "type": "function", "name": "callback", "parameters": [ { "name": "result", "type": "object", "additionalProperties": {"type": "string"} } ] } ] }, { "name": "setWallpaperIfExist", "type": "function", "description": "Sets wallpaper if it exists in the local file system with specified layout", "nodoc": "true", "parameters": [ { "type": "string", "name": "url" }, { "type": "string", "name": "layout", "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED"] }, { "type": "string", "name": "source", "enum": [ "ONLINE", "CUSTOM" ] }, { "type": "function", "name": "callback", "parameters": [] } ] }, { "name": "setWallpaper", "type": "function", "description": "Sets wallpaper to the image from url with specified layout", "nodoc": "true", "parameters": [ { "type": "binary", "name": "wallpaper" }, { "type": "string", "name": "layout", "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED"] }, { "type": "string", "name": "url" }, { "type": "function", "name": "callback", "parameters": [] } ] }, { "name": "setCustomWallpaper", "type": "function", "description": "Sets wallpaper to the image from local file with specified layout", "nodoc": "true", "parameters": [ { "type": "binary", "name": "wallpaper" }, { "type": "string", "name": "layout", "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED" ] }, { "type": "function", "name": "callback", "parameters": [ { "type": "string", "name": "fileName" } ] } ] }, { "name": "setCustomWallpaperLayout", "type": "function", "description": "Sets current custom wallpaper to the specified layout", "nodoc": "true", "parameters": [ { "type": "string", "name": "layout", "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED" ] }, { "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" }, { "type": "string", "name": "type", "enum": [ "ONLINE", "CUSTOM" ] }, { "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": "string", "name": "source", "enum": [ "ONLINE", "CUSTOM" ] }, { "type": "function", "name": "callback", "description": "Function called upon completion.", "parameters": [ { "type": "array", "name": "results", "items": {"type": "string"} } ] } ] } ] } ]