| 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/time/time.h" | 9 #include "base/time/time.h" |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Updates the UI and menu state from |downloadModel|. | 125 // Updates the UI and menu state from |downloadModel|. |
| 126 - (void)setStateFromDownload:(DownloadItemModel*)downloadModel; | 126 - (void)setStateFromDownload:(DownloadItemModel*)downloadModel; |
| 127 | 127 |
| 128 // Remove ourself from the download UI. | 128 // Remove ourself from the download UI. |
| 129 - (void)remove; | 129 - (void)remove; |
| 130 | 130 |
| 131 // Update item's visibility depending on if the item is still completely | 131 // Update item's visibility depending on if the item is still completely |
| 132 // contained in its parent. | 132 // contained in its parent. |
| 133 - (void)updateVisibility:(id)sender; | 133 - (void)updateVisibility:(id)sender; |
| 134 | 134 |
| 135 // Called after a download is opened. | 135 // Called after a download is opened or shown. |
| 136 - (void)downloadWasOpened; | 136 - (void)downloadWasOpenedOrShown; |
| 137 | 137 |
| 138 // Asynchronous icon loading callback. | 138 // Asynchronous icon loading callback. |
| 139 - (void)setIcon:(NSImage*)icon; | 139 - (void)setIcon:(NSImage*)icon; |
| 140 | 140 |
| 141 // Download item button clicked | 141 // Download item button clicked |
| 142 - (IBAction)handleButtonClick:(id)sender; | 142 - (IBAction)handleButtonClick:(id)sender; |
| 143 | 143 |
| 144 // Returns the size this item wants to have. | 144 // Returns the size this item wants to have. |
| 145 - (NSSize)preferredSize; | 145 - (NSSize)preferredSize; |
| 146 | 146 |
| 147 // Returns the DownloadItem model object belonging to this item. | 147 // Returns the DownloadItem model object belonging to this item. |
| 148 - (content::DownloadItem*)download; | 148 - (content::DownloadItem*)download; |
| 149 | 149 |
| 150 // Returns the MenuModel for the download item context menu. The returned | 150 // Returns the MenuModel for the download item context menu. The returned |
| 151 // MenuModel is owned by the DownloadItemController and will be valid until the | 151 // MenuModel is owned by the DownloadItemController and will be valid until the |
| 152 // DownloadItemController is destroyed. | 152 // DownloadItemController is destroyed. |
| 153 - (ui::MenuModel*)contextMenuModel; | 153 - (ui::MenuModel*)contextMenuModel; |
| 154 | 154 |
| 155 // Updates the tooltip with the download's path. | 155 // Updates the tooltip with the download's path. |
| 156 - (void)updateToolTip; | 156 - (void)updateToolTip; |
| 157 | 157 |
| 158 // Handling of dangerous downloads | 158 // Handling of dangerous downloads |
| 159 - (void)clearDangerousMode; | 159 - (void)clearDangerousMode; |
| 160 - (BOOL)isDangerousMode; | 160 - (BOOL)isDangerousMode; |
| 161 - (IBAction)saveDownload:(id)sender; | 161 - (IBAction)saveDownload:(id)sender; |
| 162 - (IBAction)discardDownload:(id)sender; | 162 - (IBAction)discardDownload:(id)sender; |
| 163 - (IBAction)showContextMenu:(id)sender; | 163 - (IBAction)showContextMenu:(id)sender; |
| 164 | 164 |
| 165 @end | 165 @end |
| OLD | NEW |