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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 | 9 |
10 class BaseDownloadItemModel; | 10 class BaseDownloadItemModel; |
(...skipping 10 matching lines...) Expand all Loading... |
21 IBOutlet NSTextView* showAllDownloadsLink_; | 21 IBOutlet NSTextView* showAllDownloadsLink_; |
22 | 22 |
23 // Currently these two are always the same, but they mean slightly different | 23 // Currently these two are always the same, but they mean slightly different |
24 // things. |contentAreaHasOffset_| is an implementation detail of the download | 24 // things. |contentAreaHasOffset_| is an implementation detail of the download |
25 // shelf visibility. | 25 // shelf visibility. |
26 BOOL contentAreaHasOffset_; | 26 BOOL contentAreaHasOffset_; |
27 BOOL barIsVisible_; | 27 BOOL barIsVisible_; |
28 | 28 |
29 scoped_ptr<DownloadShelf> bridge_; | 29 scoped_ptr<DownloadShelf> bridge_; |
30 NSView* contentArea_; | 30 NSView* contentArea_; |
31 int shelfHeight_; | 31 float shelfHeight_; |
32 | 32 |
33 // The download items we have added to our shelf. | 33 // The download items we have added to our shelf. |
34 scoped_nsobject<NSMutableArray> downloadItemControllers_; | 34 scoped_nsobject<NSMutableArray> downloadItemControllers_; |
35 }; | 35 }; |
36 | 36 |
37 - (id)initWithBrowser:(Browser*)browser contentArea:(NSView*)content; | 37 - (id)initWithBrowser:(Browser*)browser contentArea:(NSView*)content; |
38 | 38 |
39 - (DownloadShelf*)bridge; | 39 - (DownloadShelf*)bridge; |
40 - (BOOL)isVisible; | 40 - (BOOL)isVisible; |
41 | 41 |
42 - (IBAction)show:(id)sender; | 42 - (IBAction)show:(id)sender; |
| 43 |
| 44 // Run when the user clicks the close button on the right side of the shelf. |
43 - (IBAction)hide:(id)sender; | 45 - (IBAction)hide:(id)sender; |
44 | 46 |
45 - (void)addDownloadItem:(BaseDownloadItemModel*)model; | 47 - (void)addDownloadItem:(BaseDownloadItemModel*)model; |
46 | 48 |
47 // Resizes the download shelf based on the state of the content area. | 49 // Resizes the download shelf based on the state of the content area. |
48 - (void)resizeDownloadShelf; | 50 - (void)resizeDownloadShelf; |
49 | 51 |
50 // Remove a download, possibly via clearing browser data. | 52 // Remove a download, possibly via clearing browser data. |
51 - (void)remove:(DownloadItemController*)download; | 53 - (void)remove:(DownloadItemController*)download; |
52 | 54 |
53 // Notification that we are closing and should release our downloads. | 55 // Notification that we are closing and should release our downloads. |
54 - (void)exiting; | 56 - (void)exiting; |
55 | 57 |
| 58 // Return the height of the download shelf. |
| 59 - (float)height; |
| 60 |
56 @end | 61 @end |
OLD | NEW |