| 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 #import "base/cocoa_protocols_mac.h" | 7 #import "base/cocoa_protocols_mac.h" |
| 8 #include "base/scoped_nsobject.h" | 8 #include "base/scoped_nsobject.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #import "chrome/browser/ui/cocoa/view_resizer.h" | 10 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 scoped_ptr<DownloadShelf> bridge_; | 46 scoped_ptr<DownloadShelf> bridge_; |
| 47 | 47 |
| 48 // Height of the shelf when it's fully visible. | 48 // Height of the shelf when it's fully visible. |
| 49 CGFloat maxShelfHeight_; | 49 CGFloat maxShelfHeight_; |
| 50 | 50 |
| 51 // Current height of the shelf. Changes while the shelf is animating in or | 51 // Current height of the shelf. Changes while the shelf is animating in or |
| 52 // out. | 52 // out. |
| 53 CGFloat currentShelfHeight_; | 53 CGFloat currentShelfHeight_; |
| 54 | 54 |
| 55 // Used to autoclose the shelf when the mouse is moved off it. Is non-nil |
| 56 // only when a subsequent mouseExited event can trigger autoclose or when a |
| 57 // subsequent mouseEntered event will cancel autoclose. Is nil otherwise. |
| 58 scoped_nsobject<NSTrackingArea> trackingArea_; |
| 59 |
| 55 // The download items we have added to our shelf. | 60 // The download items we have added to our shelf. |
| 56 scoped_nsobject<NSMutableArray> downloadItemControllers_; | 61 scoped_nsobject<NSMutableArray> downloadItemControllers_; |
| 57 | 62 |
| 58 // The container that contains (and clamps) all the download items. | 63 // The container that contains (and clamps) all the download items. |
| 59 IBOutlet NSView* itemContainerView_; | 64 IBOutlet NSView* itemContainerView_; |
| 60 | 65 |
| 61 // Delegate that handles resizing our view. | 66 // Delegate that handles resizing our view. |
| 62 id<ViewResizer> resizeDelegate_; | 67 id<ViewResizer> resizeDelegate_; |
| 63 }; | 68 }; |
| 64 | 69 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 76 - (IBAction)show:(id)sender; | 81 - (IBAction)show:(id)sender; |
| 77 | 82 |
| 78 // Run when the user clicks the close button on the right side of the shelf. | 83 // Run when the user clicks the close button on the right side of the shelf. |
| 79 - (IBAction)hide:(id)sender; | 84 - (IBAction)hide:(id)sender; |
| 80 | 85 |
| 81 - (void)addDownloadItem:(BaseDownloadItemModel*)model; | 86 - (void)addDownloadItem:(BaseDownloadItemModel*)model; |
| 82 | 87 |
| 83 // Remove a download, possibly via clearing browser data. | 88 // Remove a download, possibly via clearing browser data. |
| 84 - (void)remove:(DownloadItemController*)download; | 89 - (void)remove:(DownloadItemController*)download; |
| 85 | 90 |
| 91 // Called by individual item controllers when their downloads are opened. |
| 92 - (void)downloadWasOpened:(DownloadItemController*)download; |
| 93 |
| 86 // Notification that we are closing and should release our downloads. | 94 // Notification that we are closing and should release our downloads. |
| 87 - (void)exiting; | 95 - (void)exiting; |
| 88 | 96 |
| 89 // Return the height of the download shelf. | 97 // Return the height of the download shelf. |
| 90 - (float)height; | 98 - (float)height; |
| 91 | 99 |
| 92 // Re-layouts all download items based on their current state. | 100 // Re-layouts all download items based on their current state. |
| 93 - (void)layoutItems; | 101 - (void)layoutItems; |
| 94 | 102 |
| 95 @end | 103 @end |
| OLD | NEW |