Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: chrome/common/extensions/docs/templates/intros/wallpaper.html

Issue 559583002: change chrome.wallpaper.setWallpaper api (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <h2 id="manifest">Manifest</h2> 1 <h2 id="manifest">Manifest</h2>
2 <p>You must declare the "wallpaper" permission in the app 2 <p>You must declare the "wallpaper" permission in the app
3 <a href="manifest">manifest</a> to use the wallpaper API. 3 <a href="manifest">manifest</a> to use the wallpaper API.
4 For example:</p> 4 For example:</p>
5 <pre data-filename="manifest.json"> 5 <pre data-filename="manifest.json">
6 { 6 {
7 "name": "My extension", 7 "name": "My extension",
8 ... 8 ...
9 <b>"permissions": [ 9 <b>"permissions": [
10 "wallpaper" 10 "wallpaper"
11 ]</b>, 11 ]</b>,
12 ... 12 ...
13 }</pre> 13 }</pre>
14 14
15 <h2 id="overview-examples">Examples</h2> 15 <h2 id="overview-examples">Examples</h2>
16 16
17 <p> 17 <p>
18 For example, to set the wallpaper as the image at 18 For example, to set the wallpaper as the image at
19 <code>http://example.com/a_file.png</code>, you can call 19 <code>http://example.com/a_file.png</code>, you can call
20 <code>chrome.wallpaper.setWallpaper</code> this way: 20 <code>chrome.wallpaper.setWallpaper</code> this way:
21 </p> 21 </p>
22 22
23 <pre> 23 <pre>
24 chrome.wallpaper.setWallpaper( 24 chrome.wallpaper.setWallpaper(
25 { 25 {
26 'url': 'http://example.com/a_file.jpg', 26 'url': 'http://example.com/a_file.jpg',
27 'layout': 'CENTER_CROPPED', 27 'layout': 'CENTER_CROPPED',
28 'name': 'test_wallpaper' 28 'filename': 'test_wallpaper'
29 }, function() {}); 29 }, function() {});
30 </pre> 30 </pre>
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/wallpaper.json ('k') | chrome/test/data/extensions/api_test/wallpaper/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698