| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 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_VIEWS_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_H_ | |
| 6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_H_ | |
| 7 | |
| 8 #include "views/controls/menu/menu_2.h" | |
| 9 #include "chrome/browser/extensions/extension_install_ui.h" | |
| 10 #include "chrome/browser/extensions/extension_action_context_menu_model.h" | |
| 11 | |
| 12 class Extension; | |
| 13 | |
| 14 // Displays the context menu for extension action icons (browser/page actions). | |
| 15 class ExtensionActionContextMenu : public ExtensionInstallUI::Delegate { | |
| 16 public: | |
| 17 ExtensionActionContextMenu(); | |
| 18 ~ExtensionActionContextMenu(); | |
| 19 | |
| 20 // Display the context menu at a given point. | |
| 21 void Run(Extension* extension, const gfx::Point& point); | |
| 22 | |
| 23 // ExtensionInstallUI::Delegate overrides. | |
| 24 virtual void InstallUIProceed(); | |
| 25 virtual void InstallUIAbort() {} | |
| 26 | |
| 27 private: | |
| 28 // The options menu. | |
| 29 scoped_ptr<ExtensionActionContextMenuModel> context_menu_contents_; | |
| 30 scoped_ptr<views::Menu2> context_menu_menu_; | |
| 31 | |
| 32 // The extension we are showing the menu for. | |
| 33 Extension* extension_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(ExtensionActionContextMenu); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_H_ | |
| OLD | NEW |