diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 18:54:11 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 18:54:11 +0000 |
commit | 1aab6b89de5989369e1ceecda0a3b6af056e2f89 (patch) | |
tree | 2f0c32501a24a81ea94702f4f1c83144959bbc9e /chrome/browser/gtk/download_item_gtk.h | |
parent | 501093ab1b859c11d1a89b286e46f7fc12eeb9c3 (diff) | |
download | chromium_src-1aab6b89de5989369e1ceecda0a3b6af056e2f89.zip chromium_src-1aab6b89de5989369e1ceecda0a3b6af056e2f89.tar.gz chromium_src-1aab6b89de5989369e1ceecda0a3b6af056e2f89.tar.bz2 |
Add new item animation to download shelf.
Also, fix duration and tween type for download shelf open animation.
Review URL: http://codereview.chromium.org/88064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14220 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 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/browser/gtk/download_item_gtk.h b/chrome/browser/gtk/download_item_gtk.h index 4c6bd76..a57fcbb 100644 --- a/chrome/browser/gtk/download_item_gtk.h +++ b/chrome/browser/gtk/download_item_gtk.h @@ -9,12 +9,15 @@ #include "base/scoped_ptr.h" #include "chrome/browser/download/download_manager.h" +#include "chrome/common/animation.h" class BaseDownloadItemModel; class DownloadShelfContextMenuGtk; class NineBox; +class SlideAnimation; -class DownloadItemGtk : DownloadItem::Observer { +class DownloadItemGtk : public DownloadItem::Observer, + public AnimationDelegate { public: // DownloadItemGtk takes ownership of |download_item_model|. DownloadItemGtk(BaseDownloadItemModel* download_item_model, @@ -24,10 +27,13 @@ class DownloadItemGtk : DownloadItem::Observer { // destroying its children. Hence we do nothing in the destructor. ~DownloadItemGtk(); - // DownloadItem::Observer implementation + // DownloadItem::Observer implementation. virtual void OnDownloadUpdated(DownloadItem* download); virtual void OnDownloadOpened(DownloadItem* download) { } + // AnimationDelegate implementation. + virtual void AnimationProgressed(const Animation* animation); + private: static void InitNineBoxes(); @@ -59,6 +65,9 @@ class DownloadItemGtk : DownloadItem::Observer { // animation. GtkWidget* body_; + // The GtkLabel that holds the download title text. + GtkWidget* name_label_; + // The GtkLabel that holds the status text. GtkWidget* status_label_; @@ -78,6 +87,9 @@ class DownloadItemGtk : DownloadItem::Observer { // 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 animation when this item is first added to the shelf. + scoped_ptr<SlideAnimation> new_item_animation_; }; #endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ |