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

Side by Side Diff: chrome/browser/resources/downloads.html

Issue 155750: Add "Remove from list" for each download in domui page.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « chrome/browser/dom_ui/downloads_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html i18n-values="dir:textdirection;"> 2 <html i18n-values="dir:textdirection;">
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title i18n-content="title"></title> 5 <title i18n-content="title"></title>
6 <link rel="icon" href="../../app/theme/downloads_favicon.png"> 6 <link rel="icon" href="../../app/theme/downloads_favicon.png">
7 <style> 7 <style>
8 body { 8 body {
9 background-color:white; 9 background-color:white;
10 color:black; 10 color:black;
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 // Pause/Resume are a toggle. 389 // Pause/Resume are a toggle.
390 this.controlPause_ = createLink(bind(this.togglePause_, this), 390 this.controlPause_ = createLink(bind(this.togglePause_, this),
391 localStrings.getString('control_pause')); 391 localStrings.getString('control_pause'));
392 this.nodeControls_.appendChild(this.controlPause_); 392 this.nodeControls_.appendChild(this.controlPause_);
393 393
394 this.controlResume_ = createLink(bind(this.togglePause_, this), 394 this.controlResume_ = createLink(bind(this.togglePause_, this),
395 localStrings.getString('control_resume')); 395 localStrings.getString('control_resume'));
396 this.nodeControls_.appendChild(this.controlResume_); 396 this.nodeControls_.appendChild(this.controlResume_);
397 397
398 this.controlRemove_ = createLink(bind(this.remove_, this),
399 localStrings.getString('control_removefromlist'));
400 this.nodeControls_.appendChild(this.controlRemove_);
401
398 this.controlCancel_ = createLink(bind(this.cancel_, this), 402 this.controlCancel_ = createLink(bind(this.cancel_, this),
399 localStrings.getString('control_cancel')); 403 localStrings.getString('control_cancel'));
400 this.nodeControls_.appendChild(this.controlCancel_); 404 this.nodeControls_.appendChild(this.controlCancel_);
401 405
402 // Container for 'unsafe download' UI. 406 // Container for 'unsafe download' UI.
403 this.danger_ = createElementWithClassName('div', 'show-dangerous'); 407 this.danger_ = createElementWithClassName('div', 'show-dangerous');
404 this.node.appendChild(this.danger_); 408 this.node.appendChild(this.danger_);
405 409
406 this.dangerDesc_ = document.createElement("div"); 410 this.dangerDesc_ = document.createElement("div");
407 this.danger_.appendChild(this.dangerDesc_); 411 this.danger_.appendChild(this.dangerDesc_);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 612
609 /** 613 /**
610 * Tells the backend to pause this download. 614 * Tells the backend to pause this download.
611 */ 615 */
612 Download.prototype.togglePause_ = function() { 616 Download.prototype.togglePause_ = function() {
613 chrome.send("togglepause", [this.id_.toString()]); 617 chrome.send("togglepause", [this.id_.toString()]);
614 return false; 618 return false;
615 } 619 }
616 620
617 /** 621 /**
622 * Tells the backend to remove this download from history and download shelf.
623 */
624 Download.prototype.remove_ = function() {
625 chrome.send("remove", [this.id_.toString()]);
626 return false;
627 }
628
629 /**
618 * Tells the backend to cancel this download. 630 * Tells the backend to cancel this download.
619 */ 631 */
620 Download.prototype.cancel_ = function() { 632 Download.prototype.cancel_ = function() {
621 chrome.send("cancel", [this.id_.toString()]); 633 chrome.send("cancel", [this.id_.toString()]);
622 return false; 634 return false;
623 } 635 }
624 636
625 /////////////////////////////////////////////////////////////////////////////// 637 ///////////////////////////////////////////////////////////////////////////////
626 // Page: 638 // Page:
627 var downloads, localStrings, resultsTimeout; 639 var downloads, localStrings, resultsTimeout;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 <div id="downloads-summary"> 711 <div id="downloads-summary">
700 <span id="downloads-summary-text" i18n-content="downloads">Downloads</span> 712 <span id="downloads-summary-text" i18n-content="downloads">Downloads</span>
701 <a id="clear-all" href="" onclick="clearAll();" i18n-content="clear_all">Cle ar All</a> 713 <a id="clear-all" href="" onclick="clearAll();" i18n-content="clear_all">Cle ar All</a>
702 </div> 714 </div>
703 <div id="downloads-display"></div> 715 <div id="downloads-display"></div>
704 </div> 716 </div>
705 <div class="footer"> 717 <div class="footer">
706 </div> 718 </div>
707 </body> 719 </body>
708 </html> 720 </html>
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/downloads_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698