Index: ui/views/controls/button/button_dropdown.h |
=================================================================== |
--- ui/views/controls/button/button_dropdown.h (revision 150365) |
+++ ui/views/controls/button/button_dropdown.h (working copy) |
@@ -29,6 +29,8 @@ |
// The button's class name. |
static const char kViewClassName[]; |
+ // Constructor takes ownership of the |model| and destroys |
Peter Kasting
2012/08/07 21:32:26
Nit: Allocated with new as opposed to... malloc?
gene
2012/08/07 21:42:37
Done.
|
+ // object in the destructor. |model| must be allocated with new. |
ButtonDropDown(ButtonListener* listener, ui::MenuModel* model); |
virtual ~ButtonDropDown(); |
@@ -67,7 +69,7 @@ |
private: |
// The model that populates the attached menu. |
- ui::MenuModel* model_; |
+ scoped_ptr<ui::MenuModel> model_; |
// Indicates if menu is currently showing. |
bool menu_showing_; |