Index: chrome/browser/ui/webui/downloads_dom_handler.h |
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.h b/chrome/browser/ui/webui/downloads_dom_handler.h |
index 30c42e387b37da8ced1c1b5c89791ee5f2586693..2027b2d0c7a0150cba7b88abde74fe06bcb3e9d1 100644 |
--- a/chrome/browser/ui/webui/downloads_dom_handler.h |
+++ b/chrome/browser/ui/webui/downloads_dom_handler.h |
@@ -78,6 +78,9 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler, |
// and list. |
void HandleRemove(const base::ListValue* args); |
+ // Callback for the "undo" message. Currently only undoes removals. |
+ void HandleUndo(const base::ListValue* args); |
+ |
// Callback for the "cancel" message - cancels the download. |
void HandleCancel(const base::ListValue* args); |
@@ -127,6 +130,9 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler, |
// Returns the download that is referred to in a given value. |
content::DownloadItem* GetDownloadByValue(const base::ListValue* args); |
+ // Returns the download with |id| or NULL if it doesn't exist. |
+ content::DownloadItem* GetDownloadById(uint32 id); |
+ |
// Current search terms. |
scoped_ptr<base::ListValue> search_terms_; |
@@ -137,6 +143,9 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler, |
// DownloadManager for the original profile; otherwise, this is NULL. |
scoped_ptr<AllDownloadItemNotifier> original_notifier_; |
+ // IDs of downloads to remove when this handler gets deleted. |
+ std::vector<uint32> removed_ids_; |
+ |
// Whether a call to SendCurrentDownloads() is currently scheduled. |
bool update_scheduled_; |