Chromium Code Reviews| Index: chrome/common/extensions/docs/templates/intros/wallpaper.html |
| diff --git a/chrome/common/extensions/docs/templates/intros/wallpaper.html b/chrome/common/extensions/docs/templates/intros/wallpaper.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b9ea3c4b040f0910817697cf298ef38b87bf6b23 |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/templates/intros/wallpaper.html |
| @@ -0,0 +1,34 @@ |
| +<h2 id="manifest">Manifest</h2> |
| +<p>You must declare the "wallpaper" permission in the app |
| +<a href="manifest.html">manifest</a> to use the wallpaper API. If you use the |
| +'url' property of setWallpaper, you must also specify |
| +<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
|
| +manifest. |
| +For example:</p> |
| +<pre data-filename="manifest.json"> |
| +{ |
| + "name": "My extension", |
| + ... |
| + <b>"permissions": [ |
| + "wallpaper", |
| + "http://example.com/*" |
| + ]</b>, |
| + ... |
| +}</pre> |
| + |
| +<h2 id="overview-examples">Examples</h2> |
| + |
| +<p> |
| +For example, to set the wallpaper as the image at |
| +<code>http://example.com/a_file.png</code>, you can call |
| +<code>chrome.wallpaper.setWallpaper</code> this way: |
| +</p> |
| + |
| +<pre> |
| +chrome.wallpaper.setWallpaper( |
| + { |
| + 'url': 'http://example.com/a_file.jpg', |
| + 'layout': 'CENTER_CROPPED', |
| + 'name': 'test_wallpaper' |
| + }, 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
|
| +</pre> |