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

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.cc

Issue 1809813002: [Extensions] Show a "refresh" bubble when needed with click-to-script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 4 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/browser_actions_container.cc
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
index 5ac758e36dc6de363efc0ec0d1a72beee43dc604..2d704d4137c438fd4bfe6d74da90f6f0d16877db 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
@@ -319,6 +319,25 @@ int BrowserActionsContainer::GetChevronWidth() const {
chevron_->GetPreferredSize().width() + GetChevronSpacing() : 0;
}
+void BrowserActionsContainer::ShowToolbarActionBubble(
+ scoped_ptr<ToolbarActionsBarBubbleDelegate> controller) {
+ // The container shouldn't be asked to show a bubble if it's animating.
+ DCHECK(!animating());
+ views::View* anchor_view = nullptr;
+ if (!controller->GetAnchorActionId().empty()) {
+ ToolbarActionView* action_view =
+ GetViewForId(controller->GetAnchorActionId());
+ anchor_view =
+ action_view->visible() ? action_view : GetOverflowReferenceView();
+ } else {
+ anchor_view = this;
+ }
+ ToolbarActionsBarBubbleViews* bubble =
+ new ToolbarActionsBarBubbleViews(anchor_view, std::move(controller));
+ views::BubbleDelegateView::CreateBubble(bubble);
+ bubble->Show();
+}
+
void BrowserActionsContainer::ShowExtensionMessageBubble(
scoped_ptr<extensions::ExtensionMessageBubbleController> controller,
ToolbarActionViewController* anchor_action) {
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698