summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 01:04:45 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 01:04:45 +0000
commit733436966716d5307a251c2852931531edc9b963 (patch)
tree14f7a5d2538bb4a70852f5a3e0a6a8e0e94c1b43 /app
parent489d946c2d39713777826de69d02546c8307e54e (diff)
downloadchromium_src-733436966716d5307a251c2852931531edc9b963.zip
chromium_src-733436966716d5307a251c2852931531edc9b963.tar.gz
chromium_src-733436966716d5307a251c2852931531edc9b963.tar.bz2
Factor out views::Combobox::Model so that it can be used cross-platform.
This removes the Combobox* source arg from the Model methods, which wasn't really used by anything. BUG=none TEST=none Review URL: http://codereview.chromium.org/165514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/app.gyp1
-rw-r--r--app/combobox_model.h20
2 files changed, 21 insertions, 0 deletions
diff --git a/app/app.gyp b/app/app.gyp
index 0a36bd5..902efde 100644
--- a/app/app.gyp
+++ b/app/app.gyp
@@ -63,6 +63,7 @@
'app_paths.cc',
'app_switches.h',
'app_switches.cc',
+ 'combobox_model.h',
'drag_drop_types_gtk.cc',
'drag_drop_types_win.cc',
'drag_drop_types.h',
diff --git a/app/combobox_model.h b/app/combobox_model.h
new file mode 100644
index 0000000..680f1e8
--- /dev/null
+++ b/app/combobox_model.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef APP_COMBOBOX_MODEL_H_
+#define APP_COMBOBOX_MODEL_H_
+
+// The interface for models backing a combobox.
+class ComboboxModel {
+ public:
+ virtual ~ComboboxModel() {}
+
+ // Return the number of items in the combo box.
+ virtual int GetItemCount() = 0;
+
+ // Return the string that should be used to represent a given item.
+ virtual std::wstring GetItemAt(int index) = 0;
+};
+
+#endif // APP_COMBOBOX_MODEL_H_