Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: ui/views/controls/combobox/combobox.h

Issue 9875001: views: Rename Combobox "selected getter/setter" accessors to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698