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

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: combo box -> combobox 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..570af1ca5404b64b5fb9b216a7078ece68d76cdb 100644
--- a/ui/views/controls/combobox/combobox.h
+++ b/ui/views/controls/combobox/combobox.h
@@ -24,37 +24,36 @@ namespace views {
class ComboboxListener;
-// A non-editable combo-box (aka a drop-down list)
+// A non-editable combobox (aka a drop-down list).
class VIEWS_EXPORT Combobox : public View {
public:
// The combobox's class name.
static const char kViewClassName[];
- // |model| is not owned by the combo box.
+ // |model| is not owned by the combobox.
explicit Combobox(ui::ComboboxModel* model);
virtual ~Combobox();
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 combobox 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.
+ // Called when the combobox'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.
+ // Set the accessible name of the combobox.
void SetAccessibleName(const string16& name);
// Provided only for testing:
@@ -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 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