Chromium Code Reviews| Index: chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h |
| diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h b/chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h |
| index 1b75dbeac845eb46e9f9679e6d6e513d20f3bf86..bcfe96b81e86acc6725833a3455dfa960d56e85a 100644 |
| --- a/chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h |
| +++ b/chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h |
| @@ -19,6 +19,21 @@ class ToolbarActionsBarBubbleDelegate { |
| CLOSE_DISMISS_DEACTIVATION, |
| }; |
| + // Content populating an optional view, containing an image icon and/or |
| + // (linked) text, in the bubble. |
| + struct ExtraViewInfo { |
| + ExtraViewInfo() : resource_id(-1), is_text_linked(false) {} |
| + // The resource id referencing the image icon. If has a value of -1, then no |
| + // image icon will be added. |
| + int resource_id = -1; |
|
Devlin
2016/09/12 22:51:43
nit: don't mix ctor initialization and in-class in
catmullings
2016/09/22 00:00:10
Done.
|
| + // Text in the view. If this is an empty string, no text will be added. |
| + base::string16 text; |
| + // If the struct's text is nonempty and this value is true, then a link of |
| + // the text is added. If this value is false, the text is not treated as a |
| + // link. |
| + bool is_text_linked; |
| + }; |
| + |
| virtual ~ToolbarActionsBarBubbleDelegate() {} |
| // Returns true if the bubble should (still) be shown. Since bubbles are |
| @@ -64,6 +79,11 @@ class ToolbarActionsBarBubbleDelegate { |
| // Called when the bubble is closed with the type of action the user took. |
| virtual void OnBubbleClosed(CloseAction action) = 0; |
| + |
| + // Returns the ExtraViewInfo struct associated with the bubble delegate. If |
| + // this returns a nullptr, no extra view (image icon and/or (linked) text) is |
| + // added to the bubble. |
| + virtual std::unique_ptr<ExtraViewInfo> GetExtraViewInfo() = 0; |
| }; |
| #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ |