1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import <Cocoa/Cocoa.h>
7 #import "ui/base/cocoa/menu_controller.h"
8 #include "base/mac/scoped_nsobject.h"
10 @class DownloadItemController;
12 // MenuController that retains a DownloadItemController and instantiates a menu
13 // based on the contextMenuModel from the DownloadItemController.
14 @interface DownloadShelfContextMenuController : MenuController {
16 base::scoped_nsobject<DownloadItemController> itemController_;
17 id<NSMenuDelegate> menuDelegate_;
20 // Initializes the MenuController using [itemController contextMenuModel].
21 // menuDelegate will be sent a menuDidClose message when the menu closes.
22 - (id)initWithItemController:(DownloadItemController*)itemController
23 withDelegate:(id<NSMenuDelegate>)menuDelegate;
25 - (void)menuDidClose:(NSMenu*)menu;