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

Unified Diff: chrome/browser/download/download_shelf.h

Issue 966983002: downloads: clicking "remove" on chrome://downloads should also hide shelf item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: chrome/browser/download/download_shelf.h
diff --git a/chrome/browser/download/download_shelf.h b/chrome/browser/download/download_shelf.h
index a42042f06efdf2251b0765fa1a1a8a9366caf4be..acc7708e1a50934c0ae85e87c8f92c62dd047cfa 100644
--- a/chrome/browser/download/download_shelf.h
+++ b/chrome/browser/download/download_shelf.h
@@ -135,6 +135,17 @@ class DownloadShelf {
// before the delay duration, it will not be added to the shelf at all.
void AddDownload(content::DownloadItem* download);
+ // Remove |download| from our shelf if it exists.
+ //
+ // NOTE: This call is only necessary if |download| needs to be hidden but
+ // isn't actually being deleted. For example: a download is visually hidden
+ // from chrome://downloads but isn't deleted until the page closes (so the
+ // removal can be undone).
+ //
+ // To really remove a download from all views and delete any intermediate
+ // files, call DownloadItem::Remove().
+ virtual void RemoveDownload(content::DownloadItem* download) = 0;
+
// The browser view needs to know when we are going away to properly return
// the resize corner size to WebKit so that we don't draw on top of it.
// This returns the showing state of our animation which is set to true at
« no previous file with comments | « no previous file | chrome/browser/download/test_download_shelf.h » ('j') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698