You must declare the "wallpaper" permission in the app manifest to use the wallpaper API. For example:
{
"name": "My extension",
...
"permissions": [
"wallpaper"
],
...
}
For example, to set the wallpaper as the image at
http://example.com/a_file.png, you can call
chrome.wallpaper.setWallpaper this way:
chrome.wallpaper.setWallpaper(
{
'url': 'http://example.com/a_file.jpg',
'layout': 'CENTER_CROPPED',
'filename': 'test_wallpaper'
}, function() {});