| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_UI_COCOA_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_CONTROLLER_
H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_CONTROLLER_
H_ |
| 7 |
| 5 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 6 | 9 |
| 7 #import "ui/base/cocoa/menu_controller.h" | 10 #import "ui/base/cocoa/menu_controller.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
| 9 | 12 |
| 10 @class DownloadItemController; | 13 @class DownloadItemController; |
| 11 | 14 |
| 12 // MenuController that retains a DownloadItemController and instantiates a menu | 15 // MenuController that retains a DownloadItemController and instantiates a menu |
| 13 // based on the contextMenuModel from the DownloadItemController. | 16 // based on the contextMenuModel from the DownloadItemController. |
| 14 @interface DownloadShelfContextMenuController : MenuController { | 17 @interface DownloadShelfContextMenuController : MenuController { |
| 15 @private | 18 @private |
| 16 base::scoped_nsobject<DownloadItemController> itemController_; | 19 base::scoped_nsobject<DownloadItemController> itemController_; |
| 17 id<NSMenuDelegate> menuDelegate_; | 20 id<NSMenuDelegate> menuDelegate_; |
| 18 } | 21 } |
| 19 | 22 |
| 20 // Initializes the MenuController using [itemController contextMenuModel]. | 23 // Initializes the MenuController using [itemController contextMenuModel]. |
| 21 // menuDelegate will be sent a menuDidClose message when the menu closes. | 24 // menuDelegate will be sent a menuDidClose message when the menu closes. |
| 22 - (id)initWithItemController:(DownloadItemController*)itemController | 25 - (id)initWithItemController:(DownloadItemController*)itemController |
| 23 withDelegate:(id<NSMenuDelegate>)menuDelegate; | 26 withDelegate:(id<NSMenuDelegate>)menuDelegate; |
| 24 | 27 |
| 25 - (void)menuDidClose:(NSMenu*)menu; | 28 - (void)menuDidClose:(NSMenu*)menu; |
| 26 @end | 29 @end |
| 30 |
| 31 #endif // CHROME_BROWSER_UI_COCOA_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_CONTROLL
ER_H_ |
| OLD | NEW |