| Index: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
|
| diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
|
| index af1e9934ea32b67b2060fba0166eee1bb6d3d93e..69f8e33745abfab912776120a8c122a353923951 100644
|
| --- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
|
| +++ b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
|
| @@ -5,17 +5,24 @@
|
| #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_
|
| #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_EXTENSION_TOOLBAR_MENU_VIEW_H_
|
|
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "base/scoped_observer.h"
|
| +#include "chrome/browser/ui/views/toolbar/browser_actions_container_observer.h"
|
| #include "ui/views/view.h"
|
|
|
| class Browser;
|
| class BrowserActionsContainer;
|
| +class WrenchMenu;
|
|
|
| // ExtensionToolbarMenuView is the view containing the extension actions that
|
| // overflowed from the BrowserActionsContainer, and is contained in and owned by
|
| // the wrench menu.
|
| -class ExtensionToolbarMenuView : public views::View {
|
| +// In the event that the WrenchMenu was opened for an Extension Action drag-and-
|
| +// drop, this will also close the menu upon completion.
|
| +class ExtensionToolbarMenuView : public views::View,
|
| + public BrowserActionsContainerObserver {
|
| public:
|
| - explicit ExtensionToolbarMenuView(Browser* browser);
|
| + ExtensionToolbarMenuView(Browser* browser, WrenchMenu* wrench_menu);
|
| virtual ~ExtensionToolbarMenuView();
|
|
|
| // views::View:
|
| @@ -23,9 +30,21 @@ class ExtensionToolbarMenuView : public views::View {
|
| virtual void Layout() OVERRIDE;
|
|
|
| private:
|
| + // BrowserActionsContainerObserver:
|
| + virtual void OnBrowserActionDragDone() OVERRIDE;
|
| +
|
| + // The associated browser.
|
| Browser* browser_;
|
| +
|
| + // The WrenchMenu, which may need to be closed after a drag-and-drop.
|
| + WrenchMenu* wrench_menu_;
|
| +
|
| + // The overflow BrowserActionsContainer which is nested in this view.
|
| BrowserActionsContainer* container_;
|
|
|
| + ScopedObserver<BrowserActionsContainer, BrowserActionsContainerObserver>
|
| + browser_actions_container_observer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarMenuView);
|
| };
|
|
|
|
|