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

Side by Side Diff: chrome/common/extensions/docs/experimental.downloads.html

Issue 10413011: redo r137692 and r137791 which were speculatively reverted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform 2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the 3 across api docs and should be edited only with knowledge of the
4 templating mechanism. 4 templating mechanism.
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
6 browser, it will be re-generated from the template, json schema and 6 browser, it will be re-generated from the template, json schema and
7 authored overview content. 7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this 8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines. 9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 URLs to be downloaded. For example:</p> 249 URLs to be downloaded. For example:</p>
250 <pre>{ 250 <pre>{
251 "name": "Download Selected Links", 251 "name": "Download Selected Links",
252 "description": "Select links on a page and download them.", 252 "description": "Select links on a page and download them.",
253 "version": "0.1", 253 "version": "0.1",
254 "permissions": [ 254 "permissions": [
255 "experimental", "http://*/*", "https://*/*" 255 "experimental", "http://*/*", "https://*/*"
256 ] 256 ]
257 }</pre> 257 }</pre>
258 <p>If the URL’s hostname is not specified in the permissions, then 258 <p>If the URL’s hostname is not specified in the permissions, then
259 <a href='extension.html#property-lastError'>chrome.extension.lastError</a> 259 <a href="extension.html#property-lastError">chrome.extension.lastError</a>
260 will indicate that the extension does not have permission to access that 260 will indicate that the extension does not have permission to access that
261 hostname. <a href="#properties">downloads.ERROR_*</a> are some of the errors 261 hostname. <a href="#properties">downloads.ERROR_*</a> are some of the errors
262 that may be returned.</p> 262 that may be returned.</p>
263 <h2 id="examples"> Examples </h2> 263 <h2 id="examples"> Examples </h2>
264 <p>You can find simple examples of using the downloads module in the 264 <p>You can find simple examples of using the downloads module in the
265 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension s/docs/examples/api/downloads/">examples/api/downloads</a> 265 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension s/docs/examples/api/downloads/">examples/api/downloads</a>
266 directory. For other examples and for help in viewing the source code, see 266 directory. For other examples and for help in viewing the source code, see
267 <a href="samples.html">Samples</a>.</p> 267 <a href="samples.html">Samples</a>.</p>
268 </div> 268 </div>
269 <!-- API PAGE --> 269 <!-- API PAGE -->
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 <!-- iterates over all functions --> 337 <!-- iterates over all functions -->
338 <div class="apiItem"> 338 <div class="apiItem">
339 <a name="method-download"></a> <!-- method-anchor --> 339 <a name="method-download"></a> <!-- method-anchor -->
340 <h4>download</h4> 340 <h4>download</h4>
341 <div class="summary"> 341 <div class="summary">
342 <!-- Note: intentionally longer 80 columns --> 342 <!-- Note: intentionally longer 80 columns -->
343 <span>chrome.experimental.downloads.download</span>(<span clas s="null"><span>object</span> 343 <span>chrome.experimental.downloads.download</span>(<span clas s="null"><span>object</span>
344 <var><span>options</span></var></span><span class="optiona l"><span>, </span><span>function</span> 344 <var><span>options</span></var></span><span class="optiona l"><span>, </span><span>function</span>
345 <var><span>callback</span></var></span>)</div> 345 <var><span>callback</span></var></span>)</div>
346 <div class="description"> 346 <div class="description">
347 <p>Download a URL. If the URL uses the HTTP[S] protocol, then 347 <p>Download a URL. If the URL uses the HTTP[S] protocol, then th e request will include all cookies currently set for its hostname. If both <code >filename</code> and <code>saveAs</code> are specified, then the Save As dialog will be displayed, pre-populated with the specified <code>filename</code>. If th e download started successfully, <code>callback</code> will be called with the n ew DownloadItem’s <code>downloadId</code>. If there was an error starting the do wnload, then <code>callback</code> will be called with <code>downloadId=undefine d</code> and <a href="extension.html#property-lastError">chrome.extension.lastEr ror</a> will be set to either one of the <code>ERROR_*</code> constants defined above or another descriptive string. The error strings are not guaranteed to rem ain backwards compatible between releases. You must not parse it, though you may compare it to one of the ERROR_* constants defined above and conditionalize on that comparison.</p>
348 the request will include all cookies currently set for its
349 hostname. If both <code>filename</code> and <code>saveAs</code>
350 are specified, then the Save As dialog will be displayed,
351 pre-populated with the specified <code>filename</code>. If the
352 download started successfully, <code>callback</code> will be
353 called with the new DownloadItem’s <code>downloadId</code>. If
354 there was an error starting the download, then
355 <code>callback</code> will be called with
356 <code>downloadId=undefined</code> and
357 <a href='extension.html#property-lastError'>chrome.extension.las tError</a>
358 will be set to either one of the <code>ERROR_*</code> constants
359 defined above or another descriptive string. The error strings
360 are not guaranteed to remain backwards compatible between
361 releases. You must not parse it, though you may compare it to
362 one of the ERROR_* constants defined above and conditionalize on
363 that comparison.</p>
364 <!-- PARAMETERS --> 348 <!-- PARAMETERS -->
365 <h4>Parameters</h4> 349 <h4>Parameters</h4>
366 <dl> 350 <dl>
367 <div> 351 <div>
368 <div> 352 <div>
369 <dt> 353 <dt>
370 <var>options</var> 354 <var>options</var>
371 <em> 355 <em>
372 <!-- TYPE --> 356 <!-- TYPE -->
373 <div style="display:inline"> 357 <div style="display:inline">
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 _uff=0; 748 _uff=0;
765 urchinTracker(); 749 urchinTracker();
766 } 750 }
767 catch(e) {/* urchinTracker not available. */} 751 catch(e) {/* urchinTracker not available. */}
768 </script> 752 </script>
769 <!-- end analytics --> 753 <!-- end analytics -->
770 </div> 754 </div>
771 </div> <!-- /gc-footer --> 755 </div> <!-- /gc-footer -->
772 </div> <!-- /gc-container --> 756 </div> <!-- /gc-container -->
773 </body></html> 757 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/experimental.html ('k') | chrome/common/extensions/docs/experimental.processes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698