diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 21:11:53 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 21:11:53 +0000 |
commit | 01fc514f488305c0c57038c3d5c7b28eb09df4cd (patch) | |
tree | 525aa49f4d60021b4422b9d2f82e8bf9750ed5e3 /ui/base/models | |
parent | 7cbb0f7bb8b05e0afc30c2e3752898024d9813f7 (diff) | |
download | chromium_src-01fc514f488305c0c57038c3d5c7b28eb09df4cd.zip chromium_src-01fc514f488305c0c57038c3d5c7b28eb09df4cd.tar.gz chromium_src-01fc514f488305c0c57038c3d5c7b28eb09df4cd.tar.bz2 |
add separators to ui::ComboboxModel, implement on views.
also use a separator in the country combobox model.
BUG=179496
Review URL: https://chromiumcodereview.appspot.com/12521023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/models')
-rw-r--r-- | ui/base/models/combobox_model.cc | 4 | ||||
-rw-r--r-- | ui/base/models/combobox_model.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ui/base/models/combobox_model.cc b/ui/base/models/combobox_model.cc index 27b2b47..2e4d02e 100644 --- a/ui/base/models/combobox_model.cc +++ b/ui/base/models/combobox_model.cc @@ -6,6 +6,10 @@ namespace ui { +bool ComboboxModel::IsItemSeparatorAt(int index) { + return false; +} + int ComboboxModel::GetDefaultIndex() const { return 0; } diff --git a/ui/base/models/combobox_model.h b/ui/base/models/combobox_model.h index 022a67c..9182e01 100644 --- a/ui/base/models/combobox_model.h +++ b/ui/base/models/combobox_model.h @@ -19,6 +19,10 @@ class UI_EXPORT ComboboxModel { // Returns the string at the specified index. virtual string16 GetItemAt(int index) = 0; + // Should return true if the item at |index| is a non-selectable separator + // item. + virtual bool IsItemSeparatorAt(int index); + // The index of the item that is selected by default (before user // interaction). virtual int GetDefaultIndex() const; |