Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <h2 id="manifest">Manifest</h2> | |
| 2 <p>You must declare the "wallpaper" permission in the app | |
| 3 <a href="manifest.html">manifest</a> to use the wallpaper API. If you use the | |
| 4 'url' property of setWallpaper, you must also specify | |
|
not at google - send to devlin
2013/10/18 00:18:38
"you must declare..." can be left out, the intro t
| |
| 5 <a href="declare_permissions.html">host permissions</a> for the URL in the | |
| 6 manifest. | |
| 7 For example:</p> | |
| 8 <pre data-filename="manifest.json"> | |
| 9 { | |
| 10 "name": "My extension", | |
| 11 ... | |
| 12 <b>"permissions": [ | |
| 13 "wallpaper", | |
| 14 "http://example.com/*" | |
| 15 ]</b>, | |
| 16 ... | |
| 17 }</pre> | |
| 18 | |
| 19 <h2 id="overview-examples">Examples</h2> | |
| 20 | |
| 21 <p> | |
| 22 For example, to set the wallpaper as the image at | |
| 23 <code>http://example.com/a_file.png</code>, you can call | |
| 24 <code>chrome.wallpaper.setWallpaper</code> this way: | |
| 25 </p> | |
| 26 | |
| 27 <pre> | |
| 28 chrome.wallpaper.setWallpaper( | |
| 29 { | |
| 30 'url': 'http://example.com/a_file.jpg', | |
| 31 'layout': 'CENTER_CROPPED', | |
| 32 'name': 'test_wallpaper' | |
| 33 }, function() { console.error(chrome.runtime.lastError.message); }); | |
| 34 </pre> | |
| OLD | NEW |