| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace views { | 22 namespace views { |
| 23 class MenuRunner; | 23 class MenuRunner; |
| 24 class Widget; | 24 class Widget; |
| 25 } | 25 } |
| 26 | 26 |
| 27 // This class handles the overflow menu for browser actions (showing the menu, | 27 // This class handles the overflow menu for browser actions (showing the menu, |
| 28 // drag and drop, etc). This class manages its own lifetime. | 28 // drag and drop, etc). This class manages its own lifetime. |
| 29 class BrowserActionOverflowMenuController : public views::MenuDelegate { | 29 class BrowserActionOverflowMenuController : public views::MenuDelegate { |
| 30 public: | 30 public: |
| 31 // The observer is notified prior to the menu being deleted. | |
| 32 class Observer { | 31 class Observer { |
| 33 public: | 32 public: |
| 33 // Called prior to this menu being deleted. |
| 34 virtual void NotifyMenuDeleted( | 34 virtual void NotifyMenuDeleted( |
| 35 BrowserActionOverflowMenuController* controller) = 0; | 35 BrowserActionOverflowMenuController* controller) = 0; |
| 36 |
| 37 // Called when an extension action has been moved to the overflow menu. |
| 38 virtual void NotifyActionMovedToOverflow() = 0; |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 BrowserActionOverflowMenuController( | 41 BrowserActionOverflowMenuController( |
| 39 BrowserActionsContainer* owner, | 42 BrowserActionsContainer* owner, |
| 40 Browser* browser, | 43 Browser* browser, |
| 41 views::MenuButton* menu_button, | 44 views::MenuButton* menu_button, |
| 42 const std::vector<BrowserActionView*>& views, | 45 const std::vector<BrowserActionView*>& views, |
| 43 int start_index, | 46 int start_index, |
| 44 bool for_drop); | 47 bool for_drop); |
| 45 | 48 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // controller. The icon updater will update the menu item view's icon when | 127 // controller. The icon updater will update the menu item view's icon when |
| 125 // the browser action view's icon has been updated. | 128 // the browser action view's icon has been updated. |
| 126 ScopedVector<IconUpdater> icon_updaters_; | 129 ScopedVector<IconUpdater> icon_updaters_; |
| 127 | 130 |
| 128 friend class base::DeleteHelper<BrowserActionOverflowMenuController>; | 131 friend class base::DeleteHelper<BrowserActionOverflowMenuController>; |
| 129 | 132 |
| 130 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); | 133 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR
OLLER_H_ | 136 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR
OLLER_H_ |
| OLD | NEW |