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

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: Created 4 years, 1 month 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..f518d6dc84dec31d16287a8b88e486173ab1d7a9 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/strings/string16.h"
+#include "ui/gfx/vector_icons_public.h"
// A delegate for a generic bubble that hangs off the toolbar actions bar.
class ToolbarActionsBarBubbleDelegate {
@@ -19,6 +20,26 @@ 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(gfx::VectorIconId::VECTOR_ICON_NONE),
+ is_text_linked(false) {}
+
+ // The resource id referencing the image icon. If has a value of -1, then no
+ // image icon will be added.
+ gfx::VectorIconId 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 +85,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