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