Index: chrome/common/extensions/docs/server2/templates/private/downloads_intro.html |
diff --git a/chrome/common/extensions/docs/server2/templates/private/downloads_intro.html b/chrome/common/extensions/docs/server2/templates/private/downloads_intro.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..69881cf6cc3ed0778333717a4988c4f88a0c8f8e |
--- /dev/null |
+++ b/chrome/common/extensions/docs/server2/templates/private/downloads_intro.html |
@@ -0,0 +1,27 @@ |
+<p>The downloads API allows you to programmatically initiate, monitor, |
+manipulate, and search for downloads.</p> |
+<h2 id='manifest'>Manifest</h2> |
+<p> You must declare the 'downloads' permission in the <a |
+href='manifest.html'>extension manifest</a> to use this API, along with <a |
+href='manifest.html#permissions'>host permissions</a> for any hosts that you |
+may pass to <a href='#method-download'>download()</a>.</p> |
+<pre>{ |
+ 'name': 'My extension', |
+ ... |
+<b> 'permissions': [ |
+ 'downloads', |
+ '*://*.google.com' |
+ ]</b>, |
+ ... |
+}</pre> |
+<p>If the URL's hostname is not specified in the permissions, then <a |
+href='#method-download'>download()</a> will call its callback with a null |
+<code>downloadId</code> and set the <a |
+href='extension.html#property-lastError'>chrome.extensions.lastError</a> |
+object to indicate that the extension does not have permission to access that |
+hostname.</p> |
+<h2 id='examples'>Examples</h2> |
+<p>You can find simple examples of using the downloads module in the <a |
+href='http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/downloads/'>examples/api/downloads</a> |
+directory. For other examples and for help in viewing the source code, see <a |
+href='samples.html'>Samples</a>.</p> |