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

Side by Side Diff: ui/base/models/combobox_model.h

Issue 12335026: Add GetDefaultIndex() to ComboboxModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_MODELS_COMBOBOX_MODEL_H_ 5 #ifndef UI_BASE_MODELS_COMBOBOX_MODEL_H_
6 #define UI_BASE_MODELS_COMBOBOX_MODEL_H_ 6 #define UI_BASE_MODELS_COMBOBOX_MODEL_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "ui/base/ui_export.h"
9 10
10 namespace ui { 11 namespace ui {
11 12
12 // A data model for a combo box. 13 // A data model for a combo box.
13 class ComboboxModel { 14 class ComboboxModel {
tfarina 2013/02/26 00:00:03 class UI_EXPORT ?
14 public: 15 public:
15 // Returns the number of items in the combo box. 16 // Returns the number of items in the combo box.
16 virtual int GetItemCount() const = 0; 17 virtual int GetItemCount() const = 0;
17 18
18 // Returns the string at the specified index. 19 // Returns the string at the specified index.
19 virtual string16 GetItemAt(int index) = 0; 20 virtual string16 GetItemAt(int index) = 0;
20 21
22 // The index of the item that is selected by default (before user
23 // interaction).
24 virtual int GetDefaultIndex() const;
25
21 protected: 26 protected:
22 virtual ~ComboboxModel() {} 27 virtual ~ComboboxModel() {}
23 }; 28 };
24 29
25 } // namespace ui 30 } // namespace ui
26 31
27 #endif // UI_BASE_MODELS_COMBOBOX_MODEL_H_ 32 #endif // UI_BASE_MODELS_COMBOBOX_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc ('k') | ui/base/models/combobox_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698