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

Unified Diff: chrome/browser/ui/views/download/download_item_view.cc

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: slimmer 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/ui/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 457e4d49fbb2460b9727e8242cc5b46e2da3f8c3..36db539e4dec0c22c5c292bea2bc080a5d1069a4 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -282,6 +282,9 @@ void DownloadItemView::OnDownloadUpdated(DownloadItem* download_item) {
// Force the shelf to layout again as our size has changed.
shelf_->Layout();
SchedulePaint();
+ } else if (!model_.ShouldShowInShelf()) {
+ shelf_->RemoveDownloadView(this);
+ return;
Dan Beam 2015/03/02 18:50:09 can move this earlier if this tickles the "return
asanka 2015/03/02 21:49:33 Yeah. For the reasons I mentioned in .mm above. Le
Dan Beam 2015/03/02 22:04:07 Done.
} else {
base::string16 status_text = model_.GetStatusText();
switch (download()->GetState()) {

Powered by Google App Engine
This is Rietveld 408576698