From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/ui/base/models/combobox_model.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'chromium/ui/base/models/combobox_model.h') diff --git a/chromium/ui/base/models/combobox_model.h b/chromium/ui/base/models/combobox_model.h index 2fcd7b69029..994ac2bbef7 100644 --- a/chromium/ui/base/models/combobox_model.h +++ b/chromium/ui/base/models/combobox_model.h @@ -5,15 +5,16 @@ #ifndef UI_BASE_MODELS_COMBOBOX_MODEL_H_ #define UI_BASE_MODELS_COMBOBOX_MODEL_H_ +#include "base/component_export.h" #include "base/strings/string16.h" -#include "ui/base/ui_base_export.h" namespace ui { class ComboboxModelObserver; +class ImageModel; // A data model for a combo box. -class UI_BASE_EXPORT ComboboxModel { +class COMPONENT_EXPORT(UI_BASE) ComboboxModel { public: virtual ~ComboboxModel() {} @@ -21,11 +22,27 @@ class UI_BASE_EXPORT ComboboxModel { virtual int GetItemCount() const = 0; // Returns the string at the specified index. - virtual base::string16 GetItemAt(int index) = 0; + virtual base::string16 GetItemAt(int index) const = 0; + + // Returns the string to be shown in the dropdown for the item at |index|. By + // default, it returns GetItemAt(index). + virtual base::string16 GetDropDownTextAt(int index) const; + + // Returns the secondary string at the specified index. Secondary strings are + // displayed in a second line inside every menu item. + virtual base::string16 GetDropDownSecondaryTextAt(int index) const; + + // Gets the icon for the item at the specified index. ImageModel is empty if + // there is no icon. + virtual ImageModel GetIconAt(int index) const; + + // Gets the icon for the item at |index|. ImageModel is empty if there is no + // icon. By default, it returns GetIconAt(index). + virtual ImageModel GetDropDownIconAt(int index) const; // Should return true if the item at |index| is a non-selectable separator // item. - virtual bool IsItemSeparatorAt(int index); + virtual bool IsItemSeparatorAt(int index) const; // The index of the item that is selected by default (before user // interaction). -- cgit v1.2.1