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

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: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/docs/templates/public/apps/wallpaper.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fff8c9926f29bf4c23b0ec6f074e153ba741ab36
--- /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
miket_OOO 2013/10/15 18:17:33 Because this is documentation, we should be more c
bshe 2013/10/16 20:28:30 Done.
+permission.
miket_OOO 2013/10/15 18:17:33 "in the manifest permissions."
bshe 2013/10/16 20:28:30 Done.
+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>
+Here's sample code to change wallpaper:
+</p>
+
+<pre>
+chrome.wallpaper.setWallpaper(
+ {
+ 'url': 'http://example.com/aFile.jpg',
miket_OOO 2013/10/15 18:17:33 This is horribly exacting, but our Chrome style gu
bshe 2013/10/16 20:28:30 Done.
+ 'layout': 'CENTER_CROPPED',
+ 'name': 'test_wallpaper'
+ }, function() { console.error(chrome.runtime.lastError.message); });
+</pre>
« no previous file with comments | « no previous file | chrome/common/extensions/docs/templates/public/apps/wallpaper.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698