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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc

Issue 2808823002: MacViews: Allows the toolkit-views Manage Passwords Dialog to be used (Closed)
Patch Set: MacViews: Allows the toolkit-views Manage Passwords Dialog to be used (rebase) Created 3 years, 8 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/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..0d18c6b3ae17f21301eaf67d0f10d0b172e8c2fb 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,13 +62,22 @@ LocationBarBubbleDelegateView::LocationBarBubbleDelegateView(
content::Source<FullscreenController>(
browser->exclusive_access_manager()->fullscreen_controller()));
}
+ if (!anchor_view)
+ SetAnchorRect(gfx::Rect(anchor_point, gfx::Size()));
+
// 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.
+ // When anchor is controlled by the |anchor_point| this inset is ignored.
set_anchor_view_insets(gfx::Insets(
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) {

Powered by Google App Engine
This is Rietveld 408576698