Commit 5052e15a authored by Maggie Cai's avatar Maggie Cai Committed by Commit Bot

Align intent picker bubble to the omnibox.

Currently the intent picker bubble is align with the intent picker icon,
this CL changed it to align with the edge of the omnibox.

BUG=986145

Change-Id: I95d79e857c344287ff4d73ef09fcf7866cd34d17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746332Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686247}
parent db06dca9
...@@ -115,6 +115,7 @@ IntentPickerBubbleView* IntentPickerBubbleView::intent_picker_bubble_ = nullptr; ...@@ -115,6 +115,7 @@ IntentPickerBubbleView* IntentPickerBubbleView::intent_picker_bubble_ = nullptr;
// static // static
views::Widget* IntentPickerBubbleView::ShowBubble( views::Widget* IntentPickerBubbleView::ShowBubble(
views::View* anchor_view, views::View* anchor_view,
views::Button* highlighted_button,
content::WebContents* web_contents, content::WebContents* web_contents,
std::vector<AppInfo> app_info, std::vector<AppInfo> app_info,
bool show_stay_in_chrome, bool show_stay_in_chrome,
...@@ -137,6 +138,8 @@ views::Widget* IntentPickerBubbleView::ShowBubble( ...@@ -137,6 +138,8 @@ views::Widget* IntentPickerBubbleView::ShowBubble(
intent_picker_bubble_ = new IntentPickerBubbleView( intent_picker_bubble_ = new IntentPickerBubbleView(
anchor_view, std::move(app_info), std::move(intent_picker_cb), anchor_view, std::move(app_info), std::move(intent_picker_cb),
web_contents, show_stay_in_chrome, show_remember_selection); web_contents, show_stay_in_chrome, show_remember_selection);
if (highlighted_button)
intent_picker_bubble_->SetHighlightedButton(highlighted_button);
intent_picker_bubble_->set_margins(gfx::Insets()); intent_picker_bubble_->set_margins(gfx::Insets());
intent_picker_bubble_->Initialize(); intent_picker_bubble_->Initialize();
views::Widget* widget = views::Widget* widget =
......
...@@ -69,6 +69,7 @@ class IntentPickerBubbleView : public LocationBarBubbleDelegateView, ...@@ -69,6 +69,7 @@ class IntentPickerBubbleView : public LocationBarBubbleDelegateView,
~IntentPickerBubbleView() override; ~IntentPickerBubbleView() override;
static views::Widget* ShowBubble(views::View* anchor_view, static views::Widget* ShowBubble(views::View* anchor_view,
views::Button* highlighted_button,
content::WebContents* web_contents, content::WebContents* web_contents,
std::vector<AppInfo> app_info, std::vector<AppInfo> app_info,
bool show_stay_in_chrome, bool show_stay_in_chrome,
......
...@@ -420,8 +420,9 @@ void ToolbarView::ShowIntentPickerBubble( ...@@ -420,8 +420,9 @@ void ToolbarView::ShowIntentPickerBubble(
if (!intent_picker_view->GetVisible()) if (!intent_picker_view->GetVisible())
IntentPickerTabHelper::SetShouldShowIcon(GetWebContents(), true); IntentPickerTabHelper::SetShouldShowIcon(GetWebContents(), true);
IntentPickerBubbleView::ShowBubble( IntentPickerBubbleView::ShowBubble(
intent_picker_view, GetWebContents(), std::move(app_info), location_bar(), intent_picker_view, GetWebContents(),
show_stay_in_chrome, show_remember_selection, std::move(callback)); std::move(app_info), show_stay_in_chrome, show_remember_selection,
std::move(callback));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment