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

Unified 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, 5 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 | « chrome/browser/dom_ui/downloads_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/downloads.html
===================================================================
--- chrome/browser/resources/downloads.html (revision 22137)
+++ chrome/browser/resources/downloads.html (working copy)
@@ -395,6 +395,10 @@
localStrings.getString('control_resume'));
this.nodeControls_.appendChild(this.controlResume_);
+ this.controlRemove_ = createLink(bind(this.remove_, this),
+ localStrings.getString('control_removefromlist'));
+ this.nodeControls_.appendChild(this.controlRemove_);
+
this.controlCancel_ = createLink(bind(this.cancel_, this),
localStrings.getString('control_cancel'));
this.nodeControls_.appendChild(this.controlCancel_);
@@ -615,6 +619,14 @@
}
/**
+ * Tells the backend to remove this download from history and download shelf.
+ */
+ Download.prototype.remove_ = function() {
+ chrome.send("remove", [this.id_.toString()]);
+ return false;
+}
+
+/**
* Tells the backend to cancel this download.
*/
Download.prototype.cancel_ = function() {
« 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