diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 22:19:17 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 22:19:17 +0000 |
commit | bd1ad684dee1355226c5f6946034369b98186a55 (patch) | |
tree | f96a5a2e95a8a14aa35dd07a94578d5cc66d0c02 /chrome/browser/tab_contents/tab_contents.cc | |
parent | f363a3a828686f6aad65501abe7b33b0d4d13d32 (diff) | |
download | chromium_src-bd1ad684dee1355226c5f6946034369b98186a55.zip chromium_src-bd1ad684dee1355226c5f6946034369b98186a55.tar.gz chromium_src-bd1ad684dee1355226c5f6946034369b98186a55.tar.bz2 |
GTK: Add download shelf first show animation.
http://crbug.com/8631
Review URL: http://codereview.chromium.org/113428
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index af83bfd..9e74eaf 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -22,6 +22,7 @@ #include "chrome/browser/download/download_manager.h" #include "chrome/browser/download/download_request_manager.h" #include "chrome/browser/download/download_shelf.h" +#include "chrome/browser/download/download_started_animation.h" #include "chrome/browser/gears_integration.h" #include "chrome/browser/google_util.h" #include "chrome/browser/hung_renderer_dialog.h" @@ -32,6 +33,7 @@ #include "chrome/browser/plugin_installer.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" #include "chrome/browser/renderer_host/web_cache_manager.h" +#include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" #include "chrome/browser/tab_contents/tab_contents_view.h" @@ -40,6 +42,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/page_action.h" +#include "chrome/common/platform_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/common/render_messages.h" @@ -53,9 +56,7 @@ #if defined(OS_WIN) // TODO(port): some of these headers should be ported. #include "chrome/browser/modal_html_dialog_delegate.h" -#include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/views/blocked_popup_container.h" -#include "chrome/browser/views/download_started_animation.h" #include "views/controls/scrollbar/native_scroll_bar.h" #endif @@ -955,13 +956,11 @@ void TabContents::OnStartDownload(DownloadItem* download) { new DownloadItemModel(download)); tab_contents->SetDownloadShelfVisible(true); -// TODO(port): port animatinos. -#if defined(OS_WIN) - // This animation will delete itself when it finishes, or if we become hidden - // or destroyed. - if (IsWindowVisible(GetNativeView())) { // For minimized windows, unit - // tests, etc. - new DownloadStartedAnimation(tab_contents); +// TODO(port): port for mac. +#if defined(OS_WIN) || defined(OS_LINUX) + // We make this check for the case of minimized windows, unit tests, etc. + if (platform_util::IsVisible(GetNativeView())) { + DownloadStartedAnimation::Show(tab_contents); } #endif } |