diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/base/models/menu_model.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/base/models/menu_model.h')
-rw-r--r-- | chromium/ui/base/models/menu_model.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/chromium/ui/base/models/menu_model.h b/chromium/ui/base/models/menu_model.h index 887eee64e27..c746b37d627 100644 --- a/chromium/ui/base/models/menu_model.h +++ b/chromium/ui/base/models/menu_model.h @@ -5,11 +5,11 @@ #ifndef UI_BASE_MODELS_MENU_MODEL_H_ #define UI_BASE_MODELS_MENU_MODEL_H_ +#include "base/component_export.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" #include "ui/base/models/menu_model_delegate.h" #include "ui/base/models/menu_separator_types.h" -#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" namespace gfx { @@ -23,7 +23,8 @@ class ButtonMenuItemModel; class ImageModel; // An interface implemented by an object that provides the content of a menu. -class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr<MenuModel> { +class COMPONENT_EXPORT(UI_BASE) MenuModel + : public base::SupportsWeakPtr<MenuModel> { public: // The type of item. enum ItemType { @@ -65,6 +66,10 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr<MenuModel> { // Returns the label of the item at the specified index. virtual base::string16 GetLabelAt(int index) const = 0; + // Returns the secondary label of the item at the specified index. Secondary + // label is shown below the label. + virtual base::string16 GetSecondaryLabelAt(int index) const; + // Returns the minor text of the item at the specified index. The minor text // is rendered to the right of the label and using the font GetLabelFontAt(). virtual base::string16 GetMinorTextAt(int index) const; @@ -108,6 +113,15 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr<MenuModel> { // Returns true if the menu item is visible. virtual bool IsVisibleAt(int index) const; + // Returns true if the item is rendered specially to draw attention + // for in-product help. + virtual bool IsAlertedAt(int index) const; + + // Returns true if the menu item grants access to a new feature that we want + // to show off to users (items marked as new will receive a "New" badge when + // the appropriate flag is enabled). + virtual bool IsNewFeatureAt(int index) const; + // Returns the model for the submenu at the specified index. virtual MenuModel* GetSubmenuModelAt(int index) const = 0; |