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

Unified Diff: chrome/browser/browser.cc

Issue 504031: Don't show download arrow animation for extensions (Closed)
Patch Set: Created 11 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 52eedaddd615977c8d4b74a9b8f02d385fb7235e..b742599280babf9ebf662303cb51c3f5bf180738 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -2240,13 +2240,19 @@ void Browser::OnStartDownload(DownloadItem* download) {
window()->GetDownloadShelf()->AddDownload(new DownloadItemModel(download));
// Don't show the animation for "Save file" downloads.
- if (download->total_bytes() > 0) {
- TabContents* current_tab = GetSelectedTabContents();
- // We make this check for the case of minimized windows, unit tests, etc.
- if (platform_util::IsVisible(current_tab->GetNativeView()) &&
- Animation::ShouldRenderRichAnimation())
- DownloadStartedAnimation::Show(current_tab);
- }
+ if (download->total_bytes() <= 0)
+ return;
+
+ // For non-theme extensions, we don't show the download animation.
+ if (DownloadManager::IsExtensionInstall(download) &&
+ !ExtensionsService::IsDownloadFromMiniGallery(download->url()))
+ return;
+
+ TabContents* current_tab = GetSelectedTabContents();
+ // We make this check for the case of minimized windows, unit tests, etc.
+ if (platform_util::IsVisible(current_tab->GetNativeView()) &&
+ Animation::ShouldRenderRichAnimation())
+ DownloadStartedAnimation::Show(current_tab);
}
void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698