| 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..d40c164eb508271a0264681ec1825514adfd1076 100644
|
| --- a/chrome/browser/ui/webui/downloads_dom_handler.h
|
| +++ b/chrome/browser/ui/webui/downloads_dom_handler.h
|
| @@ -88,6 +88,9 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler,
|
| // folder.
|
| void HandleOpenDownloadsFolder(const base::ListValue* args);
|
|
|
| + // Callback for the "undoRemove" message. Undoes any previous removal.
|
| + void HandleUndoRemove(const base::ListValue* args);
|
| +
|
| protected:
|
| // These methods are for mocking so that most of this class does not actually
|
| // depend on WebUI. The other methods that depend on WebUI are
|
| @@ -124,6 +127,9 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler,
|
| // to be deleted.
|
| bool IsDeletingHistoryAllowed();
|
|
|
| + // Finalizes any pending removal (if there is one).
|
| + void FinalizeRemoval();
|
| +
|
| // Returns the download that is referred to in a given value.
|
| content::DownloadItem* GetDownloadByValue(const base::ListValue* args);
|
|
|
| @@ -140,6 +146,10 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler,
|
| // Whether a call to SendCurrentDownloads() is currently scheduled.
|
| bool update_scheduled_;
|
|
|
| + // The last download removed from this page. If no download has been removed
|
| + // or a download is revived, this will be DownloadItem::kInvalidId.
|
| + uint32 last_removed_id_;
|
| +
|
| base::WeakPtrFactory<DownloadsDOMHandler> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler);
|
|
|