Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5814)

Unified Diff: chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h

Issue 2206693002: Improve settings override bubble to indicate policy installed extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed path 4 code review; initial attempt to remove "Restore Settings" button Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698