OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import "chrome/browser/cocoa/download_item_cell.h" | 5 #import "chrome/browser/cocoa/download_item_cell.h" |
6 | 6 |
7 #include "app/gfx/canvas_paint.h" | 7 #include "app/gfx/canvas_paint.h" |
8 #include "app/gfx/text_elider.h" | 8 #include "app/gfx/text_elider.h" |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 } | 676 } |
677 | 677 |
678 @end | 678 @end |
679 | 679 |
680 @implementation DownloadItemCellAnimation | 680 @implementation DownloadItemCellAnimation |
681 | 681 |
682 - (id)initWithDownloadItemCell:(DownloadItemCell*)cell | 682 - (id)initWithDownloadItemCell:(DownloadItemCell*)cell |
683 duration:(NSTimeInterval)duration | 683 duration:(NSTimeInterval)duration |
684 animationCurve:(NSAnimationCurve)animationCurve { | 684 animationCurve:(NSAnimationCurve)animationCurve { |
685 if ((self = [super gtm_initWithDuration:duration | 685 if ((self = [super gtm_initWithDuration:duration |
| 686 eventMask:NSLeftMouseDownMask |
686 animationCurve:animationCurve])) { | 687 animationCurve:animationCurve])) { |
687 cell_ = cell; | 688 cell_ = cell; |
688 [self setAnimationBlockingMode:NSAnimationNonblocking]; | 689 [self setAnimationBlockingMode:NSAnimationNonblocking]; |
689 } | 690 } |
690 return self; | 691 return self; |
691 } | 692 } |
692 | 693 |
693 - (void)setCurrentProgress:(NSAnimationProgress)progress { | 694 - (void)setCurrentProgress:(NSAnimationProgress)progress { |
694 [super setCurrentProgress:progress]; | 695 [super setCurrentProgress:progress]; |
695 [cell_ animation:self progressed:progress]; | 696 [cell_ animation:self progressed:progress]; |
696 } | 697 } |
697 | 698 |
698 @end | 699 @end |
OLD | NEW |