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..8e09f6f19c89fc89d67053c3d1bee6fb9b6eaa35 |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/templates/intros/wallpaper.html |
| @@ -0,0 +1,31 @@ |
| +<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 whitelist the domain of your URL in |
| +the manifest permissions. |
| +For example:</p> |
|
not at google - send to devlin
2013/10/16 21:17:27
This text should go in permissions.json:
https://
bshe
2013/10/17 18:13:32
Done.
|
| +<pre data-filename="manifest.json"> |
| +{ |
| + "name": "My extension", |
| + ... |
| + <b>"permissions": [ |
| + "wallpaper", |
| + "http://example.com/*" |
| + ]</b>, |
| + ... |
| +}</pre> |
| + |
| +<h2 id="overview-examples">Examples</h2> |
| + |
| +<p> |
| +Here's sample code to change wallpaper: |
| +</p> |
|
not at google - send to devlin
2013/10/16 21:17:27
This paragraph isn't much use. You can make it bet
bshe
2013/10/17 18:13:32
Done.
|
| + |
| +<pre> |
| +chrome.wallpaper.setWallpaper( |
| + { |
| + 'url': 'http://example.com/a_file.jpg', |
| + 'layout': 'CENTER_CROPPED', |
| + 'name': 'test_wallpaper' |
| + }, function() { console.error(chrome.runtime.lastError.message); }); |
| +</pre> |