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

Side by Side Diff: chrome/browser/cocoa/download_item_cell.h

Issue 159060: Use a real download item.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: first round of review comments addressed Created 11 years, 5 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
« no previous file with comments | « chrome/app/nibs/DownloadShelf.xib ('k') | chrome/browser/cocoa/download_item_cell.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_
6 #define CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_
7
8 #import "chrome/browser/cocoa/gradient_button_cell.h"
9
10 #include "base/file_path.h"
11
12 class BaseDownloadItemModel;
13
14 // A button cell that implements the weird button/popup button hybrid that is
15 // used by the download items.
16
17 // The button represented by this cell consists of a button part on the left
18 // and a dropdown-menu part on the right. This enum describes which part the
19 // mouse cursor is over currently.
20 enum DownloadItemMousePosition {
21 kDownloadItemMouseOutside,
22 kDownloadItemMouseOverButtonPart,
23 kDownloadItemMouseOverDropdownPart
24 };
25
26 @interface DownloadItemCell : GradientButtonCell {
27 @private
28 // Track which part of the button the mouse is over
29 DownloadItemMousePosition mousePosition_;
30 int mouseInsideCount_;
31 scoped_nsobject<NSTrackingArea> trackingAreaButton_;
32 scoped_nsobject<NSTrackingArea> trackingAreaDropdown_;
33
34 FilePath downloadPath_; // stored unelided
35 NSString* secondaryTitle_;
36 NSFont* secondaryFont_;
37
38 BOOL isStatusTextVisible_;
39 CGFloat titleY_;
40 CGFloat statusAlpha_;
41 scoped_nsobject<NSAnimation> hideStatusAnimation_;
42 }
43
44 - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel;
45
46 @property (copy) NSString* secondaryTitle;
47 @property (retain) NSFont* secondaryFont;
48
49 // Valid to call in response to a click of the cell's button. Returns if the
50 // button part of the cell was clicked.
51 - (BOOL)isButtonPartPressed;
52
53 @end
54
55 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_CELL_H_
56
OLDNEW
« no previous file with comments | « chrome/app/nibs/DownloadShelf.xib ('k') | chrome/browser/cocoa/download_item_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698