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

Unified Diff: chrome/browser/ui/gtk/download/download_item_gtk.cc

Issue 10665049: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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
Index: chrome/browser/ui/gtk/download/download_item_gtk.cc
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index 35118a2e1a62f555464b35229fb4b548e117fa3a..b10831c8101a35501c143e3996e1678b2e764002 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -326,9 +326,6 @@ void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
}
switch (download->GetState()) {
- case DownloadItem::REMOVING:
- parent_shelf_->RemoveDownloadItem(this); // This will delete us!
- return;
case DownloadItem::CANCELLED:
StopDownloadProgress();
gtk_widget_queue_draw(progress_area_.get());
@@ -372,6 +369,11 @@ void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
UpdateStatusLabel(status_text_);
}
+void DownloadItemGtk::OnDownloadDestroyed(DownloadItem* download) {
+ parent_shelf_->RemoveDownloadItem(this);
+ // This will delete us!
+}
+
void DownloadItemGtk::AnimationProgressed(const ui::Animation* animation) {
if (animation == &complete_animation_) {
gtk_widget_queue_draw(progress_area_.get());

Powered by Google App Engine
This is Rietveld 408576698