| Index: ui/views/controls/combobox/combobox.h
|
| diff --git a/ui/views/controls/combobox/combobox.h b/ui/views/controls/combobox/combobox.h
|
| index 20b65e0a4c06b9a9ca095aef60c123bfdd2acab2..96e54845e0a23c5a85410842981d827f4ab90d5d 100644
|
| --- a/ui/views/controls/combobox/combobox.h
|
| +++ b/ui/views/controls/combobox/combobox.h
|
| @@ -36,10 +36,14 @@ class Painter;
|
| class PrefixSelector;
|
|
|
| // A non-editable combobox (aka a drop-down list or selector).
|
| -// Combobox has two distinct parts, the drop down arrow and the text. When the
|
| -// user clicks on the text the drop down is either shown
|
| -// (STYLE_SHOW_DROP_DOWN_ON_CLICK) or the listener is notified
|
| -// (STYLE_NOTIFY_ON_CLICK).
|
| +// Combobox has two distinct parts, the drop down arrow and the text. Combobox
|
| +// offers two distinct behaviors:
|
| +// * STYLE_NORMAL: typical combobox, clicking on the text and/or button shows
|
| +// the drop down, arrow keys change selection, selected index can be changed by
|
| +// the user to something other than the first item.
|
| +// * STYLE_ACTION: clicking on the text notifies the listener. The menu can be
|
| +// shown only by clicking on the arrow. The selected index is always reverted to
|
| +// 0 after the listener is notified.
|
| class VIEWS_EXPORT Combobox : public MenuDelegate,
|
| public PrefixDelegate,
|
| public ui::ComboboxModelObserver,
|
| @@ -47,8 +51,8 @@ class VIEWS_EXPORT Combobox : public MenuDelegate,
|
| public:
|
| // The style of the combobox.
|
| enum Style {
|
| - STYLE_SHOW_DROP_DOWN_ON_CLICK,
|
| - STYLE_NOTIFY_ON_CLICK,
|
| + STYLE_NORMAL,
|
| + STYLE_ACTION,
|
| };
|
|
|
| // The combobox's class name.
|
| @@ -121,6 +125,7 @@ class VIEWS_EXPORT Combobox : public MenuDelegate,
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(ComboboxTest, Click);
|
| FRIEND_TEST_ALL_PREFIXES(ComboboxTest, NotifyOnClickWithMouse);
|
| + FRIEND_TEST_ALL_PREFIXES(ComboboxTest, ContentWidth);
|
|
|
| // Updates the combobox's content from its model.
|
| void UpdateFromModel();
|
|
|