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

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

Issue 1961001: Refactors animation to allow for cleaner subclassing. I'm doing this (Closed)
Patch Set: Incorporated review feedback Created 10 years, 8 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/gtk/download_item_gtk.cc
diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc
index fd17beb77430a55425c5ac0533d8f18d53911637..00f3ca1f7523b0501164560270daf01383a837c6 100644
--- a/chrome/browser/gtk/download_item_gtk.cc
+++ b/chrome/browser/gtk/download_item_gtk.cc
@@ -361,7 +361,7 @@ void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
complete_animation_.reset(new SlideAnimation(this));
complete_animation_->SetSlideDuration(kCompleteAnimationDurationMs);
- complete_animation_->SetTweenType(SlideAnimation::NONE);
+ complete_animation_->SetTweenType(Tween::LINEAR);
complete_animation_->Show();
break;
case DownloadItem::IN_PROGRESS:
@@ -801,7 +801,7 @@ gboolean DownloadItemGtk::OnProgressAreaExpose(GtkWidget* widget,
// Create a transparent canvas.
gfx::CanvasPaint canvas(event, false);
if (download_item->complete_animation_.get()) {
- if (download_item->complete_animation_->IsAnimating()) {
+ if (download_item->complete_animation_->is_animating()) {
download_util::PaintDownloadComplete(&canvas,
widget->allocation.x, widget->allocation.y,
download_item->complete_animation_->GetCurrentValue(),
@@ -834,7 +834,7 @@ gboolean DownloadItemGtk::OnMenuButtonPressEvent(GtkWidget* button,
DownloadItemGtk* item) {
// Stop any completion animation.
if (item->complete_animation_.get() &&
- item->complete_animation_->IsAnimating()) {
+ item->complete_animation_->is_animating()) {
item->complete_animation_->End();
}
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/browser/gtk/download_started_animation_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698