Chromium Code Reviews| Index: ui/views/controls/combobox/combobox.h |
| diff --git a/ui/views/controls/combobox/combobox.h b/ui/views/controls/combobox/combobox.h |
| index 2705f7e22cc57e836ec64d03223a41bce479a585..3f739a03b6fad9ae9c719b69ba0886d882fab05b 100644 |
| --- a/ui/views/controls/combobox/combobox.h |
| +++ b/ui/views/controls/combobox/combobox.h |
| @@ -53,7 +53,7 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { |
| static const char kViewClassName[]; |
| // |model| is not owned by the combobox. |
| - explicit Combobox(ui::ComboboxModel* model); |
| + explicit Combobox(ui::ComboboxModel* model, Style style = STYLE_NORMAL); |
| ~Combobox() override; |
| static const gfx::FontList& GetFontList(); |
| @@ -61,8 +61,6 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { |
| // Sets the listener which will be called when a selection has been made. |
| void set_listener(ComboboxListener* listener) { listener_ = listener; } |
| - void SetStyle(Style style); |
| - |
| // Informs the combobox that its model changed. |
| void ModelChanged(); |
| @@ -85,10 +83,6 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { |
| void SetInvalid(bool invalid); |
| bool invalid() const { return invalid_; } |
| - // Returns the width of the arrow button component of the combobox: the arrow |
| - // button itself, and the padding on either side of it. |
| - int GetArrowButtonWidth() const; |
| - |
| // Overridden from View: |
| gfx::Size GetPreferredSize() const override; |
| const char* GetClassName() const override; |
| @@ -100,6 +94,7 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { |
| void OnBlur() override; |
| void GetAccessibleState(ui::AXViewState* state) override; |
| void Layout() override; |
| + void OnEnabledChanged() override; |
| // Overridden from PrefixDelegate: |
| int GetRowCount() override; |
| @@ -148,11 +143,15 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { |
| PrefixSelector* GetPrefixSelector(); |
| + // Returns the width of the combobox's "shoulder", which is the part |
| + // containing the arrow, including any padding around it. |
| + int GetShoulderWidth() const; |
|
sky
2016/05/17 16:49:21
Shoulder? Why not ArrowWidth? Or ArrowContainerWid
Elly Fong-Jones
2016/05/17 17:35:05
tapted and I just liked "shoulder" more than "arro
|
| + |
| // Our model. Not owned. |
| ui::ComboboxModel* model_; |
| // The visual style of this combobox. |
| - Style style_; |
| + const Style style_; |
| // Our listener. Not owned. Notified when the selected index change. |
| ComboboxListener* listener_; |
| @@ -203,6 +202,9 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { |
| // destroyed. |
| std::unique_ptr<views::MenuRunner> menu_runner_; |
| + // The image to be drawn for this combobox's arrow. |
| + gfx::ImageSkia arrow_image_; |
| + |
| // Used for making calbacks. |
| base::WeakPtrFactory<Combobox> weak_ptr_factory_; |