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

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

Issue 2630473003: MacViews: Harmony for toolbar actions bubbles. (Closed)
Patch Set: respond to comments Created 3 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
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 ba8992f3c0e0b6c9de3ee77d0eca4e0b40dff038..4b6ae91e3c871cb2671ec13b9b10d9bba33edf35 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
@@ -260,12 +260,14 @@ void BrowserActionsContainer::ShowToolbarActionBubble(
DCHECK(!active_bubble_);
views::View* anchor_view = nullptr;
+ bool anchored_to_action_view = false;
if (!controller->GetAnchorActionId().empty()) {
ToolbarActionView* action_view =
GetViewForId(controller->GetAnchorActionId());
if (action_view) {
anchor_view =
action_view->visible() ? action_view : GetOverflowReferenceView();
+ anchored_to_action_view = true;
} else {
anchor_view = BrowserView::GetBrowserViewForBrowser(browser_)
->toolbar()
@@ -275,8 +277,9 @@ void BrowserActionsContainer::ShowToolbarActionBubble(
anchor_view = this;
}
- ToolbarActionsBarBubbleViews* bubble =
- new ToolbarActionsBarBubbleViews(anchor_view, std::move(controller));
+ ToolbarActionsBarBubbleViews* bubble = new ToolbarActionsBarBubbleViews(
+ anchor_view, gfx::Point(), anchored_to_action_view,
+ std::move(controller));
active_bubble_ = bubble;
views::BubbleDialogDelegateView::CreateBubble(bubble);
bubble->GetWidget()->AddObserver(this);

Powered by Google App Engine
This is Rietveld 408576698