Make castv2 performance test work.
[chromium-blink-merge.git] / ui / views / controls / prefix_delegate.h
bloba6d27ebe7e01c12fcd101765751ce25aa86ccd03
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_
6 #define UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_
8 #include "ui/views/view.h"
10 namespace views {
12 // An interface used to expose lists of items for selection by text input.
13 class VIEWS_EXPORT PrefixDelegate : public View {
14 public:
15 // Returns the total number of selectable items.
16 virtual int GetRowCount() = 0;
18 // Returns the row of the currently selected item, or -1 if no item is
19 // selected.
20 virtual int GetSelectedRow() = 0;
22 // Sets the selection to the specified row.
23 virtual void SetSelectedRow(int row) = 0;
25 // Returns the item at the specified row.
26 virtual base::string16 GetTextForRow(int row) = 0;
28 protected:
29 ~PrefixDelegate() override {}
32 } // namespace views
34 #endif // UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_