OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_MENU_MENU_2_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_MENU_2_H_ |
6 #define VIEWS_CONTROLS_MENU_MENU_2_H_ | 6 #define VIEWS_CONTROLS_MENU_MENU_2_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/menus/menu_model.h" | 9 #include "app/menus/menu_model.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Add a listener to receive a callback when the menu opens. | 70 // Add a listener to receive a callback when the menu opens. |
71 void AddMenuListener(MenuListener* listener); | 71 void AddMenuListener(MenuListener* listener); |
72 | 72 |
73 // Remove a menu listener. | 73 // Remove a menu listener. |
74 void RemoveMenuListener(MenuListener* listener); | 74 void RemoveMenuListener(MenuListener* listener); |
75 | 75 |
76 // Accessors. | 76 // Accessors. |
77 menus::MenuModel* model() const { return model_; } | 77 menus::MenuModel* model() const { return model_; } |
78 | 78 |
| 79 // Sets the minimum width of the menu. |
| 80 void SetMinimumWidth(int width); |
| 81 |
79 private: | 82 private: |
80 friend class NativeMenuGtk; | 83 friend class NativeMenuGtk; |
81 | 84 |
82 menus::MenuModel* model_; | 85 menus::MenuModel* model_; |
83 | 86 |
84 // The object that actually implements the menu. | 87 // The object that actually implements the menu. |
85 scoped_ptr<MenuWrapper> wrapper_; | 88 scoped_ptr<MenuWrapper> wrapper_; |
86 | 89 |
87 DISALLOW_COPY_AND_ASSIGN(Menu2); | 90 DISALLOW_COPY_AND_ASSIGN(Menu2); |
88 }; | 91 }; |
89 | 92 |
90 } // namespace views | 93 } // namespace views |
91 | 94 |
92 #endif // VIEWS_CONTROLS_MENU_MENU_2_H_ | 95 #endif // VIEWS_CONTROLS_MENU_MENU_2_H_ |
OLD | NEW |