| Index: ui/views/controls/combobox/combobox.h
|
| diff --git a/ui/views/controls/combobox/combobox.h b/ui/views/controls/combobox/combobox.h
|
| index 5cd44549de00c5b340a73098ad130a72dd216625..3de7dc7d880798675fb7c15c307253bc30b74b43 100644
|
| --- a/ui/views/controls/combobox/combobox.h
|
| +++ b/ui/views/controls/combobox/combobox.h
|
| @@ -28,6 +28,7 @@ class ComboboxTestApi;
|
|
|
| class ComboboxListener;
|
| class CustomButton;
|
| +class MenuModelAdapter;
|
| class MenuRunner;
|
| class Painter;
|
| class PrefixSelector;
|
| @@ -113,7 +114,7 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener {
|
| private:
|
| friend class test::ComboboxTestApi;
|
|
|
| - class ComboboxMenuModelAdapter;
|
| + class ComboboxMenuModel;
|
|
|
| // Updates the border according to the current state.
|
| void UpdateBorder();
|
| @@ -130,6 +131,9 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener {
|
| // Show the drop down list
|
| void ShowDropDownMenu(ui::MenuSourceType source_type);
|
|
|
| + // Cleans up after the menu as closed
|
| + void OnMenuClosed(Button::ButtonState original_button_state);
|
| +
|
| // Called when the selection is changed by the user.
|
| void OnPerformAction();
|
|
|
| @@ -172,8 +176,8 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener {
|
| // A helper used to select entries by keyboard input.
|
| std::unique_ptr<PrefixSelector> selector_;
|
|
|
| - // Adapts a ComboboxModel for use by a views MenuRunner.
|
| - std::unique_ptr<ui::MenuModel> menu_model_adapter_;
|
| + // The ComboboxModel for use by |menu_runner_|.
|
| + std::unique_ptr<ui::MenuModel> menu_model_;
|
|
|
| // Like MenuButton, we use a time object in order to keep track of when the
|
| // combobox was closed. The time is used for simulating menu behavior; that
|
| @@ -204,7 +208,8 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener {
|
|
|
| // Set while the dropdown is showing. Ensures the menu is closed if |this| is
|
| // destroyed.
|
| - std::unique_ptr<views::MenuRunner> menu_runner_;
|
| + std::unique_ptr<MenuModelAdapter> menu_model_adapter_;
|
| + std::unique_ptr<MenuRunner> menu_runner_;
|
|
|
| // The image to be drawn for this combobox's arrow.
|
| gfx::ImageSkia arrow_image_;
|
|
|