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 5774fe26576f8db6f55af83015a5c0b64e11271f..4199500a3ab00b7a8815db03c6a24657028848d8 100644 |
| --- a/ui/views/controls/combobox/combobox.h |
| +++ b/ui/views/controls/combobox/combobox.h |
| @@ -24,7 +24,7 @@ namespace views { |
| class ComboboxListener; |
| -// A non-editable combo-box (aka a drop-down list) |
| +// A non-editable combo box (aka a drop-down list). |
|
sky
2012/03/27 22:52:32
Because the class is named 'Combobox' we should us
|
| class VIEWS_EXPORT Combobox : public View { |
| public: |
| // The combobox's class name. |
| @@ -36,22 +36,21 @@ class VIEWS_EXPORT Combobox : public View { |
| static const gfx::Font& GetFont(); |
| - // Register |listener| for item change events. |
| + // Sets the listener which will be called when a selection has been made. |
| void set_listener(ComboboxListener* listener) { |
| listener_ = listener; |
| } |
| - // Inform the combo box that its model changed. |
| + // Informs the combo box that its model changed. |
| void ModelChanged(); |
| - // Gets/Sets the selected item. |
| - int selected_item() const { return selected_item_; } |
| - void SetSelectedItem(int index); |
| + // Gets/Sets the selected index. |
| + int selected_index() const { return selected_index_; } |
| + void SetSelectedIndex(int index); |
| // Called when the combo box's selection is changed by the user. |
| void SelectionChanged(); |
| - // Accessor for |model_|. |
| ui::ComboboxModel* model() const { return model_; } |
| // Set the accessible name of the combo box. |
| @@ -88,16 +87,16 @@ class VIEWS_EXPORT Combobox : public View { |
| NativeComboboxWrapper* native_wrapper_; |
| private: |
| - // Our model. |
| + // Our model. Not owned. |
| ui::ComboboxModel* model_; |
| - // The combobox's listener. Notified when the selected item change. |
| + // Our listener. Not owned. Notified when the selected index change. |
| ComboboxListener* listener_; |
| - // The current selection. |
| - int selected_item_; |
| + // The current selected index. |
| + int selected_index_; |
| - // The accessible name of the text field. |
| + // The accessible name of this combo box. |
|
sky
2012/03/27 22:52:32
combobox
|
| string16 accessible_name_; |
| DISALLOW_COPY_AND_ASSIGN(Combobox); |