| Index: chrome/browser/ui/views/toolbar/wrench_menu.h
|
| diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.h b/chrome/browser/ui/views/toolbar/wrench_menu.h
|
| index 6108547badca3ffcad92a2c916bf01ea605f92b9..ab07c50bd26ac82e705bba929462486244a68b97 100644
|
| --- a/chrome/browser/ui/views/toolbar/wrench_menu.h
|
| +++ b/chrome/browser/ui/views/toolbar/wrench_menu.h
|
| @@ -37,10 +37,13 @@ class WrenchMenu : public views::MenuDelegate,
|
| public BaseBookmarkModelObserver,
|
| public content::NotificationObserver {
|
| public:
|
| + // |for_drop| indicates whether or not the menu is being opened for a
|
| + // drag-and-drop operation.
|
| // TODO: remove |use_new_menu| and |supports_new_separators|.
|
| WrenchMenu(Browser* browser,
|
| bool use_new_menu,
|
| - bool supports_new_separators);
|
| + bool supports_new_separators,
|
| + bool for_drop);
|
| virtual ~WrenchMenu();
|
|
|
| void Init(ui::MenuModel* model);
|
| @@ -48,10 +51,14 @@ class WrenchMenu : public views::MenuDelegate,
|
| // Shows the menu relative to the specified view.
|
| void RunMenu(views::MenuButton* host);
|
|
|
| + // Closes the menu if it is open, otherwise does nothing.
|
| + void CloseMenu();
|
| +
|
| // Whether the menu is currently visible to the user.
|
| bool IsShowing();
|
|
|
| bool use_new_menu() const { return use_new_menu_; }
|
| + bool for_drop() const { return for_drop_; }
|
|
|
| void AddObserver(WrenchMenuObserver* observer);
|
| void RemoveObserver(WrenchMenuObserver* observer);
|
| @@ -94,6 +101,7 @@ class WrenchMenu : public views::MenuDelegate,
|
| virtual void WillShowMenu(views::MenuItemView* menu) OVERRIDE;
|
| virtual void WillHideMenu(views::MenuItemView* menu) OVERRIDE;
|
| virtual bool ShouldCloseOnDragComplete() OVERRIDE;
|
| + virtual bool InNestedDrag() OVERRIDE;
|
|
|
| // BaseBookmarkModelObserver overrides:
|
| virtual void BookmarkModelChanged() OVERRIDE;
|
| @@ -181,6 +189,9 @@ class WrenchMenu : public views::MenuDelegate,
|
|
|
| const bool supports_new_separators_;
|
|
|
| + // Whether or not the menu is opened for a drag and drop operation.
|
| + bool for_drop_;
|
| +
|
| ObserverList<WrenchMenuObserver> observer_list_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WrenchMenu);
|
|
|