| 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 #ifndef CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_ | 5 #ifndef CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_ |
| 6 #define CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_ | 6 #define CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_ |
| 7 | 7 |
| 8 #import "base/cocoa_protocols_mac.h" | 8 #import "base/cocoa_protocols_mac.h" |
| 9 #import "chrome/browser/cocoa/gradient_button_cell.h" | 9 #import "chrome/browser/cocoa/gradient_button_cell.h" |
| 10 | 10 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 | 12 |
| 13 class BaseDownloadItemModel; | 13 class BaseDownloadItemModel; |
| 14 @class GTMTheme; |
| 14 | 15 |
| 15 // A button cell that implements the weird button/popup button hybrid that is | 16 // A button cell that implements the weird button/popup button hybrid that is |
| 16 // used by the download items. | 17 // used by the download items. |
| 17 | 18 |
| 18 // The button represented by this cell consists of a button part on the left | 19 // The button represented by this cell consists of a button part on the left |
| 19 // and a dropdown-menu part on the right. This enum describes which part the | 20 // and a dropdown-menu part on the right. This enum describes which part the |
| 20 // mouse cursor is over currently. | 21 // mouse cursor is over currently. |
| 21 enum DownloadItemMousePosition { | 22 enum DownloadItemMousePosition { |
| 22 kDownloadItemMouseOutside, | 23 kDownloadItemMouseOutside, |
| 23 kDownloadItemMouseOverButtonPart, | 24 kDownloadItemMouseOverButtonPart, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 35 FilePath downloadPath_; // stored unelided | 36 FilePath downloadPath_; // stored unelided |
| 36 NSString* secondaryTitle_; | 37 NSString* secondaryTitle_; |
| 37 NSFont* secondaryFont_; | 38 NSFont* secondaryFont_; |
| 38 int percentDone_; | 39 int percentDone_; |
| 39 scoped_nsobject<NSAnimation> completionAnimation_; | 40 scoped_nsobject<NSAnimation> completionAnimation_; |
| 40 | 41 |
| 41 BOOL isStatusTextVisible_; | 42 BOOL isStatusTextVisible_; |
| 42 CGFloat titleY_; | 43 CGFloat titleY_; |
| 43 CGFloat statusAlpha_; | 44 CGFloat statusAlpha_; |
| 44 scoped_nsobject<NSAnimation> hideStatusAnimation_; | 45 scoped_nsobject<NSAnimation> hideStatusAnimation_; |
| 46 |
| 47 scoped_nsobject<GTMTheme> theme_; |
| 45 } | 48 } |
| 46 | 49 |
| 47 - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel; | 50 - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel; |
| 48 | 51 |
| 49 @property (copy) NSString* secondaryTitle; | 52 @property (copy) NSString* secondaryTitle; |
| 50 @property (retain) NSFont* secondaryFont; | 53 @property (retain) NSFont* secondaryFont; |
| 51 | 54 |
| 52 // Valid to call in response to a click of the cell's button. Returns if the | 55 // Valid to call in response to a click of the cell's button. Returns if the |
| 53 // button part of the cell was clicked. | 56 // button part of the cell was clicked. |
| 54 - (BOOL)isButtonPartPressed; | 57 - (BOOL)isButtonPartPressed; |
| 55 | 58 |
| 56 @end | 59 @end |
| 57 | 60 |
| 58 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_ | 61 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_ |
| 59 | 62 |
| OLD | NEW |