OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_COCOA_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_H_ |
| 6 #define CHROME_BROWSER_COCOA_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_H_ |
| 7 |
| 8 #include "base/ref_counted.h" |
| 9 |
| 10 #import <Cocoa/Cocoa.h> |
| 11 |
| 12 class Extension; |
| 13 class AsyncUninstaller; |
| 14 |
| 15 // A context menu used by the Browser and Page Action components that appears |
| 16 // if a user right-clicks the view of the given extension. |
| 17 @interface ExtensionActionContextMenu : NSMenu { |
| 18 // The extension that this menu belongs to. Weak. |
| 19 Extension* extension_; |
| 20 |
| 21 // Used to load the extension icon asynchronously on the I/O thread then show |
| 22 // the uninstall confirmation dialog. |
| 23 scoped_refptr<AsyncUninstaller> uninstaller_; |
| 24 } |
| 25 |
| 26 // Initializes and returns a context menu for the given extension. |
| 27 - (id)initWithExtension:(Extension*)extension; |
| 28 |
| 29 @end |
| 30 |
| 31 typedef ExtensionActionContextMenu ExtensionActionContextMenuMac; |
| 32 |
| 33 #endif // CHROME_BROWSER_COCOA_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_H_ |
OLD | NEW |