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

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

Issue 27335003: Add docs for chrome.wallpaper API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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..955163d26f1bd6433378b3a6b483172d2ee984c8
--- /dev/null
+++ b/chrome/common/extensions/docs/templates/intros/wallpaper.html
@@ -0,0 +1,30 @@
+<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.
+For example:</p>
+<pre data-filename="manifest.json">
+{
+ "name": "My extension",
+ ...
+ <b>"permissions": [
+ "wallpaper"
+ ]</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>
not at google - send to devlin 2013/11/14 21:55:55 maybe data-filename="background.js" here?
bshe 2013/11/14 22:47:30 Not sure if this should belong to background.js, o
+chrome.wallpaper.setWallpaper(
+ {
+ 'url': 'http://example.com/a_file.jpg',
+ 'layout': 'CENTER_CROPPED',
+ 'name': 'test_wallpaper'
+ }, function() {});
+</pre>

Powered by Google App Engine
This is Rietveld 408576698