OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
10 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" | 10 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Run when the user clicks the close button on the right side of the shelf. | 95 // Run when the user clicks the close button on the right side of the shelf. |
96 - (IBAction)handleClose:(id)sender; | 96 - (IBAction)handleClose:(id)sender; |
97 | 97 |
98 // Shows or hides the download shelf based on the value of |show|. | 98 // Shows or hides the download shelf based on the value of |show|. |
99 // |isUserAction| should be YES if the operation is being triggered based on a | 99 // |isUserAction| should be YES if the operation is being triggered based on a |
100 // user action (currently only relevant when hiding the shelf). | 100 // user action (currently only relevant when hiding the shelf). |
101 // Note: This is intended to be invoked from DownloadShelfMac. If invoked | 101 // Note: This is intended to be invoked from DownloadShelfMac. If invoked |
102 // directly, the shelf visibility state maintained by DownloadShelf and the | 102 // directly, the shelf visibility state maintained by DownloadShelf and the |
103 // owning Browser will not be updated. | 103 // owning Browser will not be updated. |
104 - (void)showDownloadShelf:(BOOL)show | 104 - (void)showDownloadShelf:(BOOL)show |
105 isUserAction:(BOOL)isUserAction; | 105 isUserAction:(BOOL)isUserAction |
| 106 animate:(BOOL)animate; |
106 | 107 |
107 // Returns our view cast as an AnimatableView. | 108 // Returns our view cast as an AnimatableView. |
108 - (AnimatableView*)animatableView; | 109 - (AnimatableView*)animatableView; |
109 | 110 |
110 - (DownloadShelf*)bridge; | 111 - (DownloadShelf*)bridge; |
111 - (BOOL)isVisible; | 112 - (BOOL)isVisible; |
112 | 113 |
113 // Add a new download item to the leftmost position of the download shelf. The | 114 // Add a new download item to the leftmost position of the download shelf. The |
114 // item should not have been already added to this shelf. | 115 // item should not have been already added to this shelf. |
115 - (void)addDownloadItem:(content::DownloadItem*)downloadItem; | 116 - (void)addDownloadItem:(content::DownloadItem*)downloadItem; |
116 | 117 |
117 // Similar to addDownloadItem above, but adds a DownloadItemController. | 118 // Similar to addDownloadItem above, but adds a DownloadItemController. |
118 - (void)add:(DownloadItemController*)download; | 119 - (void)add:(DownloadItemController*)download; |
119 | 120 |
120 // Remove a download, possibly via clearing browser data. | 121 // Remove a download, possibly via clearing browser data. |
121 - (void)remove:(DownloadItemController*)download; | 122 - (void)remove:(DownloadItemController*)download; |
122 | 123 |
123 // Called by individual item controllers when their downloads are opened. | 124 // Called by individual item controllers when their downloads are opened. |
124 - (void)downloadWasOpened:(DownloadItemController*)download; | 125 - (void)downloadWasOpened:(DownloadItemController*)download; |
125 | 126 |
126 // Return the height of the download shelf. | 127 // Return the height of the download shelf. |
127 - (float)height; | 128 - (float)height; |
128 | 129 |
129 // Re-layouts all download items based on their current state. | 130 // Re-layouts all download items based on their current state. |
130 - (void)layoutItems; | 131 - (void)layoutItems; |
131 | 132 |
132 @end | 133 @end |
OLD | NEW |