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 whitelist the domain of your url in | |
|
miket_OOO
2013/10/15 18:17:33
Because this is documentation, we should be more c
bshe
2013/10/16 20:28:30
Done.
| |
| 5 permission. | |
|
miket_OOO
2013/10/15 18:17:33
"in the manifest permissions."
bshe
2013/10/16 20:28:30
Done.
| |
| 6 For example:</p> | |
| 7 <pre data-filename="manifest.json"> | |
| 8 { | |
| 9 "name": "My extension", | |
| 10 ... | |
| 11 <b>"permissions": [ | |
| 12 "wallpaper", | |
| 13 "http://example.com/*" | |
| 14 ]</b>, | |
| 15 ... | |
| 16 }</pre> | |
| 17 | |
| 18 <h2 id="overview-examples">Examples</h2> | |
| 19 | |
| 20 <p> | |
| 21 Here's sample code to change wallpaper: | |
| 22 </p> | |
| 23 | |
| 24 <pre> | |
| 25 chrome.wallpaper.setWallpaper( | |
| 26 { | |
| 27 'url': 'http://example.com/aFile.jpg', | |
|
miket_OOO
2013/10/15 18:17:33
This is horribly exacting, but our Chrome style gu
bshe
2013/10/16 20:28:30
Done.
| |
| 28 'layout': 'CENTER_CROPPED', | |
| 29 'name': 'test_wallpaper' | |
| 30 }, function() { console.error(chrome.runtime.lastError.message); }); | |
| 31 </pre> | |
| OLD | NEW |