Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: chrome/browser/ui/cocoa/download/download_item_controller.h

Issue 10421021: Make DownloadProtectionService not use BrowserList::GetLastActive() to load a link. Instead pass th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 BaseDownloadItemModel; 10 class BaseDownloadItemModel;
11 @class ChromeUILocalizer; 11 @class ChromeUILocalizer;
12 @class DownloadItemCell; 12 @class DownloadItemCell;
13 @class DownloadItemButton; 13 @class DownloadItemButton;
14 class DownloadItemMac; 14 class DownloadItemMac;
15 class DownloadShelfContextMenuMac; 15 class DownloadShelfContextMenuMac;
16 @class DownloadShelfController; 16 @class DownloadShelfController;
17 @class GTMWidthBasedTweaker; 17 @class GTMWidthBasedTweaker;
18 18
19 namespace content { 19 namespace content {
20 class DownloadItem; 20 class DownloadItem;
21 class PageNavigator;
21 } 22 }
22 23
23 namespace gfx { 24 namespace gfx {
24 class Font; 25 class Font;
25 } 26 }
26 27
27 // A controller class that manages one download item. 28 // A controller class that manages one download item.
28 29
29 @interface DownloadItemController : NSViewController { 30 @interface DownloadItemController : NSViewController {
30 @private 31 @private
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 66
66 // The state of this item. 67 // The state of this item.
67 enum DownoadItemState { 68 enum DownoadItemState {
68 kNormal, 69 kNormal,
69 kDangerous 70 kDangerous
70 } state_; 71 } state_;
71 }; 72 };
72 73
73 // Takes ownership of |downloadModel|. 74 // Takes ownership of |downloadModel|.
74 - (id)initWithModel:(BaseDownloadItemModel*)downloadModel 75 - (id)initWithModel:(BaseDownloadItemModel*)downloadModel
75 shelf:(DownloadShelfController*)shelf; 76 shelf:(DownloadShelfController*)shelf
77 navigator:(content::PageNavigator*)navigator;
76 78
77 // Updates the UI and menu state from |downloadModel|. 79 // Updates the UI and menu state from |downloadModel|.
78 - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel; 80 - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel;
79 81
80 // Remove ourself from the download UI. 82 // Remove ourself from the download UI.
81 - (void)remove; 83 - (void)remove;
82 84
83 // 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
84 // contained in its parent. 86 // contained in its parent.
85 - (void)updateVisibility:(id)sender; 87 - (void)updateVisibility:(id)sender;
(...skipping 23 matching lines...) Expand all
109 - (IBAction)discardDownload:(id)sender; 111 - (IBAction)discardDownload:(id)sender;
110 112
111 // Context menu handlers. 113 // Context menu handlers.
112 - (IBAction)handleOpen:(id)sender; 114 - (IBAction)handleOpen:(id)sender;
113 - (IBAction)handleAlwaysOpen:(id)sender; 115 - (IBAction)handleAlwaysOpen:(id)sender;
114 - (IBAction)handleReveal:(id)sender; 116 - (IBAction)handleReveal:(id)sender;
115 - (IBAction)handleCancel:(id)sender; 117 - (IBAction)handleCancel:(id)sender;
116 - (IBAction)handleTogglePause:(id)sender; 118 - (IBAction)handleTogglePause:(id)sender;
117 119
118 @end 120 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698