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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 11673003: UI changes associated with downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged from DownloadsResumption; includes CanResumeDownload, which was nuked in the original CL. Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/download/download_item_view.h" 5 #include "chrome/browser/ui/views/download/download_item_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 if (icon) { 791 if (icon) {
792 if (!IsShowingWarningDialog()) { 792 if (!IsShowingWarningDialog()) {
793 if (download_->IsInProgress()) { 793 if (download_->IsInProgress()) {
794 download_util::PaintDownloadProgress(canvas, this, 0, 0, 794 download_util::PaintDownloadProgress(canvas, this, 0, 0,
795 progress_angle_, 795 progress_angle_,
796 model_->PercentComplete(), 796 model_->PercentComplete(),
797 download_util::SMALL); 797 download_util::SMALL);
798 } else if (download_->IsComplete() && 798 } else if (download_->IsComplete() &&
799 complete_animation_.get() && 799 complete_animation_.get() &&
800 complete_animation_->is_animating()) { 800 complete_animation_->is_animating()) {
801 if (download_->IsInterrupted()) {
802 download_util::PaintDownloadInterrupted(canvas, this, 0, 0,
803 complete_animation_->GetCurrentValue(),
804 download_util::SMALL);
805 } else {
806 download_util::PaintDownloadComplete(canvas, this, 0, 0, 801 download_util::PaintDownloadComplete(canvas, this, 0, 0,
807 complete_animation_->GetCurrentValue(), 802 complete_animation_->GetCurrentValue(),
808 download_util::SMALL); 803 download_util::SMALL);
809 } 804 } else if (download_->IsInterrupted()) {
805 download_util::PaintDownloadInterrupted(canvas, this, 0, 0,
806 complete_animation_->GetCurrentValue(),
807 download_util::SMALL);
810 } 808 }
811 } 809 }
812 810
813 // Draw the icon image. 811 // Draw the icon image.
814 int icon_x, icon_y; 812 int icon_x, icon_y;
815 813
816 if (IsShowingWarningDialog()) { 814 if (IsShowingWarningDialog()) {
817 icon_x = kLeftPadding + body_image_set->top_left->width(); 815 icon_x = kLeftPadding + body_image_set->top_left->width();
818 icon_y = (height() - icon->height()) / 2; 816 icon_y = (height() - icon->height()) / 2;
819 } else { 817 } else {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 void DownloadItemView::AnimateStateTransition(State from, State to, 1214 void DownloadItemView::AnimateStateTransition(State from, State to,
1217 ui::SlideAnimation* animation) { 1215 ui::SlideAnimation* animation) {
1218 if (from == NORMAL && to == HOT) { 1216 if (from == NORMAL && to == HOT) {
1219 animation->Show(); 1217 animation->Show();
1220 } else if (from == HOT && to == NORMAL) { 1218 } else if (from == HOT && to == NORMAL) {
1221 animation->Hide(); 1219 animation->Hide();
1222 } else if (from != to) { 1220 } else if (from != to) {
1223 animation->Reset((to == HOT) ? 1.0 : 0.0); 1221 animation->Reset((to == HOT) ? 1.0 : 0.0);
1224 } 1222 }
1225 } 1223 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/downloads/downloads.js ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698