Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / templates / intros / wallpaper.html
blob67dcd8a44bd3ebdfd01a900242d2e6be373e71ca
1 <h2 id="manifest">Manifest</h2>
2 <p>You must declare the "wallpaper" permission in the {{platform}}'s
3 <a href="manifest">manifest</a> to use the wallpaper API.
4 For example:</p>
5 <pre data-filename="manifest.json">
7 "name": "My extension",
8 ...
9 <b>"permissions": [
10 "wallpaper"
11 ]</b>,
12 ...
13 }</pre>
15 <h2 id="overview-examples">Examples</h2>
17 <p>
18 For example, to set the wallpaper as the image at
19 <code>http://example.com/a_file.png</code>, you can call
20 <code>chrome.wallpaper.setWallpaper</code> this way:
21 </p>
23 <pre>
24 chrome.wallpaper.setWallpaper(
26 'url': 'http://example.com/a_file.jpg',
27 'layout': 'CENTER_CROPPED',
28 'filename': 'test_wallpaper'
29 }, function() {});
30 </pre>