OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 void set_observer(Observer* observer) { observer_ = observer; } | 41 void set_observer(Observer* observer) { observer_ = observer; } |
42 | 42 |
43 // Shows the overflow menu. | 43 // Shows the overflow menu. |
44 bool RunMenu(views::Widget* widget, bool for_drop); | 44 bool RunMenu(views::Widget* widget, bool for_drop); |
45 | 45 |
46 // Closes the overflow menu (and its context menu if open as well). | 46 // Closes the overflow menu (and its context menu if open as well). |
47 void CancelMenu(); | 47 void CancelMenu(); |
48 | 48 |
49 // Overridden from views::MenuDelegate: | 49 // Overridden from views::MenuDelegate: |
| 50 virtual bool IsCommandEnabled(int id) const OVERRIDE; |
50 virtual void ExecuteCommand(int id) OVERRIDE; | 51 virtual void ExecuteCommand(int id) OVERRIDE; |
51 virtual bool ShowContextMenu(views::MenuItemView* source, | 52 virtual bool ShowContextMenu(views::MenuItemView* source, |
52 int id, | 53 int id, |
53 const gfx::Point& p, | 54 const gfx::Point& p, |
54 bool is_mouse_gesture) OVERRIDE; | 55 bool is_mouse_gesture) OVERRIDE; |
55 virtual void DropMenuClosed(views::MenuItemView* menu) OVERRIDE; | 56 virtual void DropMenuClosed(views::MenuItemView* menu) OVERRIDE; |
56 // These drag functions offer support for dragging icons into the overflow | 57 // These drag functions offer support for dragging icons into the overflow |
57 // menu. | 58 // menu. |
58 virtual bool GetDropFormats( | 59 virtual bool GetDropFormats( |
59 views::MenuItemView* menu, | 60 views::MenuItemView* menu, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 110 |
110 // Whether this controller is being used for drop. | 111 // Whether this controller is being used for drop. |
111 bool for_drop_; | 112 bool for_drop_; |
112 | 113 |
113 friend class base::DeleteHelper<BrowserActionOverflowMenuController>; | 114 friend class base::DeleteHelper<BrowserActionOverflowMenuController>; |
114 | 115 |
115 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); | 116 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); |
116 }; | 117 }; |
117 | 118 |
118 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR
OLLER_H_ | 119 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR
OLLER_H_ |
OLD | NEW |