Index: chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc |
index 27543b4e2af1d075ea2066b1c7d8963483d8bd2a..d8bdfeb671f102e5a57cb973bfb37bf5cf6066ed 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc |
@@ -49,6 +49,7 @@ void LocationBarBubbleDelegateView::WebContentMouseHandler::OnTouchEvent( |
LocationBarBubbleDelegateView::LocationBarBubbleDelegateView( |
views::View* anchor_view, |
+ const gfx::Point& anchor_point, |
content::WebContents* web_contents) |
: BubbleDialogDelegateView(anchor_view, |
anchor_view ? views::BubbleBorder::TOP_RIGHT |
@@ -61,6 +62,11 @@ LocationBarBubbleDelegateView::LocationBarBubbleDelegateView( |
content::Source<FullscreenController>( |
browser->exclusive_access_manager()->fullscreen_controller())); |
} |
+ if (!anchor_view) { |
+ SetAnchorRect(gfx::Rect(anchor_point, gfx::Size())); |
+ return; |
tapted
2017/04/19 03:31:06
I think we don't want this early return (i.e. we s
varkha
2017/04/19 08:34:16
Done.
|
+ } |
+ |
// Compensate for built-in vertical padding in the anchor view's image. |
// In the case of Harmony, this is just compensating for the location bar's |
// border thickness, as the bubble's top border should overlap it. |
@@ -68,6 +74,11 @@ LocationBarBubbleDelegateView::LocationBarBubbleDelegateView( |
GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0)); |
} |
+LocationBarBubbleDelegateView::LocationBarBubbleDelegateView( |
+ views::View* anchor_view, |
+ content::WebContents* web_contents) |
+ : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents) {} |
+ |
LocationBarBubbleDelegateView::~LocationBarBubbleDelegateView() {} |
void LocationBarBubbleDelegateView::ShowForReason(DisplayReason reason) { |