| Index: chrome/browser/gtk/bookmark_context_menu.h
|
| ===================================================================
|
| --- chrome/browser/gtk/bookmark_context_menu.h (revision 26846)
|
| +++ chrome/browser/gtk/bookmark_context_menu.h (working copy)
|
| @@ -50,6 +50,12 @@
|
| BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER
|
| };
|
|
|
| + class Delegate {
|
| + public:
|
| + // Called when one of the menu items is selected and executed.
|
| + virtual void WillExecuteCommand() = 0;
|
| + };
|
| +
|
| // Creates the bookmark context menu.
|
| // |profile| is used for opening urls as well as enabling 'open incognito'.
|
| // |browser| is used to determine the PageNavigator and may be null.
|
| @@ -63,7 +69,8 @@
|
| PageNavigator* navigator,
|
| const BookmarkNode* parent,
|
| const std::vector<const BookmarkNode*>& selection,
|
| - ConfigurationType configuration);
|
| + ConfigurationType configuration,
|
| + Delegate* delegate);
|
| virtual ~BookmarkContextMenu();
|
|
|
| #if defined(TOOLKIT_VIEWS)
|
| @@ -80,6 +87,9 @@
|
| GtkWidget* menu() const { return menu_->widget(); }
|
| #endif
|
|
|
| + // Should be called by the delegate when it is no longer valid.
|
| + void DelegateDestroyed();
|
| +
|
| // Menu::Delegate / MenuGtk::Delegate methods.
|
| virtual void ExecuteCommand(int id);
|
| virtual bool IsItemChecked(int id) const;
|
| @@ -143,6 +153,7 @@
|
| std::vector<const BookmarkNode*> selection_;
|
| BookmarkModel* model_;
|
| ConfigurationType configuration_;
|
| + Delegate* delegate_;
|
|
|
| #if defined(OS_WIN) || defined(TOOLKIT_VIEWS)
|
| scoped_ptr<views::MenuItemView> menu_;
|
|
|