| 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 "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 | 9 |
| 10 @class ChromeUILocalizer; | 10 @class ChromeUILocalizer; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Default font to use for text metrics. | 64 // Default font to use for text metrics. |
| 65 scoped_ptr<gfx::Font> font_; | 65 scoped_ptr<gfx::Font> font_; |
| 66 | 66 |
| 67 // The state of this item. | 67 // The state of this item. |
| 68 enum DownoadItemState { | 68 enum DownoadItemState { |
| 69 kNormal, | 69 kNormal, |
| 70 kDangerous | 70 kDangerous |
| 71 } state_; | 71 } state_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // Takes ownership of |downloadModel|. | 74 // Initialize controller for |downloadItem|. |
| 75 - (id)initWithModel:(DownloadItemModel*)downloadModel | 75 - (id)initWithDownload:(content::DownloadItem*)downloadItem |
| 76 shelf:(DownloadShelfController*)shelf | 76 shelf:(DownloadShelfController*)shelf |
| 77 navigator:(content::PageNavigator*)navigator; | 77 navigator:(content::PageNavigator*)navigator; |
| 78 | 78 |
| 79 // Updates the UI and menu state from |downloadModel|. | 79 // Updates the UI and menu state from |downloadModel|. |
| 80 - (void)setStateFromDownload:(DownloadItemModel*)downloadModel; | 80 - (void)setStateFromDownload:(DownloadItemModel*)downloadModel; |
| 81 | 81 |
| 82 // Remove ourself from the download UI. | 82 // Remove ourself from the download UI. |
| 83 - (void)remove; | 83 - (void)remove; |
| 84 | 84 |
| 85 // Update item's visibility depending on if the item is still completely | 85 // Update item's visibility depending on if the item is still completely |
| 86 // contained in its parent. | 86 // contained in its parent. |
| 87 - (void)updateVisibility:(id)sender; | 87 - (void)updateVisibility:(id)sender; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 111 - (IBAction)discardDownload:(id)sender; | 111 - (IBAction)discardDownload:(id)sender; |
| 112 | 112 |
| 113 // Context menu handlers. | 113 // Context menu handlers. |
| 114 - (IBAction)handleOpen:(id)sender; | 114 - (IBAction)handleOpen:(id)sender; |
| 115 - (IBAction)handleAlwaysOpen:(id)sender; | 115 - (IBAction)handleAlwaysOpen:(id)sender; |
| 116 - (IBAction)handleReveal:(id)sender; | 116 - (IBAction)handleReveal:(id)sender; |
| 117 - (IBAction)handleCancel:(id)sender; | 117 - (IBAction)handleCancel:(id)sender; |
| 118 - (IBAction)handleTogglePause:(id)sender; | 118 - (IBAction)handleTogglePause:(id)sender; |
| 119 | 119 |
| 120 @end | 120 @end |
| OLD | NEW |