| 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..6f1b8b26ebed9d426a9abfa34d73bd585aa6c72d 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,22 @@ 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;
|
| + // 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 +80,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_
|
|
|