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 | |
5 <a href="declare_permissions.html">host permissions</a> for the URL in the | |
not at google - send to devlin
2013/10/17 18:18:20
move this into permissions/wallpaper.html
bshe
2013/10/17 20:32:18
It looks like the permissions/wallpaper.html shoul
| |
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); }); | |
not at google - send to devlin
2013/10/17 18:18:20
why are you printing out the error? is this functi
bshe
2013/10/17 20:32:18
If the XMLRequest failed (user forgot to specify h
| |
34 </pre> | |
OLD | NEW |