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

Unified Diff: chrome/browser/views/download_item_view.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
« no previous file with comments | « chrome/browser/views/browser_actions_container.cc ('k') | chrome/browser/views/download_shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_item_view.cc
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 900c0ccdc9699263005752a56ab074a749d4b141..a448e0a596923a9a1504eb9bdde44635593cc3ec 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -360,7 +360,7 @@ void DownloadItemView::OnDownloadUpdated(DownloadItem* download) {
StopDownloadProgress();
complete_animation_.reset(new SlideAnimation(this));
complete_animation_->SetSlideDuration(kCompleteAnimationDurationMs);
- complete_animation_->SetTweenType(SlideAnimation::NONE);
+ complete_animation_->SetTweenType(Tween::LINEAR);
complete_animation_->Show();
if (status_text.empty())
show_status_text_ = false;
@@ -656,7 +656,7 @@ void DownloadItemView::Paint(gfx::Canvas* canvas) {
download_util::SMALL);
} else if (download_->state() == DownloadItem::COMPLETE &&
complete_animation_.get() &&
- complete_animation_->IsAnimating()) {
+ complete_animation_->is_animating()) {
download_util::PaintDownloadComplete(canvas, this, 0, 0,
complete_animation_->GetCurrentValue(),
download_util::SMALL);
@@ -784,7 +784,7 @@ bool DownloadItemView::OnMousePressed(const views::MouseEvent& event) {
return true;
// Stop any completion animation.
- if (complete_animation_.get() && complete_animation_->IsAnimating())
+ if (complete_animation_.get() && complete_animation_->is_animating())
complete_animation_->End();
if (event.IsOnlyLeftMouseButton()) {
« no previous file with comments | « chrome/browser/views/browser_actions_container.cc ('k') | chrome/browser/views/download_shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698