diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-05 20:50:44 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-05 20:50:44 +0000 |
commit | b2cc43523f7bb309cecd6071de51a1677e5d15cf (patch) | |
tree | f35c93b5d7cdd95877f86f30cca96738856b7236 /chrome/browser/gtk/download_item_gtk.h | |
parent | bef76ead355bfb64d93336a548b8b16602a853c1 (diff) | |
download | chromium_src-b2cc43523f7bb309cecd6071de51a1677e5d15cf.zip chromium_src-b2cc43523f7bb309cecd6071de51a1677e5d15cf.tar.gz chromium_src-b2cc43523f7bb309cecd6071de51a1677e5d15cf.tar.bz2 |
Linux download shelf: remove download items when the associated download is removed.
BUG=11381
TEST=in opt mode: download something, go to downloads tab, clear all, go back to tab with downloaded item. The shelf should be gone.
Review URL: http://codereview.chromium.org/100366
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/download_item_gtk.h')
-rw-r--r-- | chrome/browser/gtk/download_item_gtk.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/gtk/download_item_gtk.h b/chrome/browser/gtk/download_item_gtk.h index e3cabb2..b7cde2d 100644 --- a/chrome/browser/gtk/download_item_gtk.h +++ b/chrome/browser/gtk/download_item_gtk.h @@ -13,6 +13,7 @@ class BaseDownloadItemModel; class DownloadShelfContextMenuGtk; +class DownloadShelfGtk; class NineBox; class SlideAnimation; @@ -20,8 +21,8 @@ class DownloadItemGtk : public DownloadItem::Observer, public AnimationDelegate { public: // DownloadItemGtk takes ownership of |download_item_model|. - DownloadItemGtk(BaseDownloadItemModel* download_item_model, - GtkWidget* parent_shelf, GtkWidget* bounding_widget); + DownloadItemGtk(DownloadShelfGtk* parent_shelf, + BaseDownloadItemModel* download_item_model); // We put |hbox_| in |parent_shelf| and rely on |parent_shelf| recursively // destroying its children. Hence we do nothing in the destructor. @@ -58,6 +59,9 @@ class DownloadItemGtk : public DownloadItem::Observer, static NineBox* menu_nine_box_prelight_; static NineBox* menu_nine_box_active_; + // The shelf on which we are displayed. + DownloadShelfGtk* parent_shelf_; + // The widget that contains the body and menu dropdown. GtkWidget* hbox_; @@ -81,13 +85,14 @@ class DownloadItemGtk : public DownloadItem::Observer, // The download item model we represent. scoped_ptr<BaseDownloadItemModel> download_model_; - // The shelf we show ourselves on. We do not own this widget. - GtkWidget* parent_shelf_; - // This is the leftmost widget on |parent_shelf_| that is not a download item. // We do not want to overlap it. GtkWidget* bounding_widget_; + // The ID of the handler for the parent shelf's "size-allocate" event. We save + // it so we can disconnect when we are destroyed. + gulong resize_handler_id_; + // The animation when this item is first added to the shelf. scoped_ptr<SlideAnimation> new_item_animation_; }; |