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

Unified Diff: chrome/browser/ui/cocoa/download/download_item_controller.mm

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/download/download_item_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/download/download_item_controller.mm (revision 138377)
+++ chrome/browser/ui/cocoa/download/download_item_controller.mm (working copy)
@@ -23,6 +23,7 @@
#import "chrome/browser/ui/cocoa/themed_window.h"
#import "chrome/browser/ui/cocoa/ui_localizer.h"
#include "content/public/browser/download_item.h"
+#include "content/public/browser/page_navigator.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
@@ -73,8 +74,9 @@
class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
public:
- DownloadShelfContextMenuMac(BaseDownloadItemModel* model)
- : DownloadShelfContextMenu(model) { }
+ DownloadShelfContextMenuMac(BaseDownloadItemModel* model,
+ content::PageNavigator* navigator)
+ : DownloadShelfContextMenu(model, navigator) { }
using DownloadShelfContextMenu::ExecuteCommand;
using DownloadShelfContextMenu::IsCommandIdChecked;
@@ -98,12 +100,14 @@
@implementation DownloadItemController
- (id)initWithModel:(BaseDownloadItemModel*)downloadModel
- shelf:(DownloadShelfController*)shelf {
+ shelf:(DownloadShelfController*)shelf
+ navigator:(content::PageNavigator*)navigator {
if ((self = [super initWithNibName:@"DownloadItem"
bundle:base::mac::FrameworkBundle()])) {
// Must be called before [self view], so that bridge_ is set in awakeFromNib
bridge_.reset(new DownloadItemMac(downloadModel, self));
- menuBridge_.reset(new DownloadShelfContextMenuMac(downloadModel));
+ menuBridge_.reset(new DownloadShelfContextMenuMac(downloadModel,
+ navigator));
NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
[defaultCenter addObserver:self

Powered by Google App Engine
This is Rietveld 408576698