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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 2815303004: Update the Windows iOS promotion to have the same width as the bubble that appears before it. (Closed)
Patch Set: Same width bubble 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/bookmarks/bookmark_bubble_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 0e8c261e3a902436d472a5d049443203c147a18e..52f69ff5277e82cb1b3f0819d998b53ee794c69b 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -404,6 +404,7 @@ void BookmarkBubbleView::ApplyEdits() {
#if defined(OS_WIN)
void BookmarkBubbleView::ShowIOSPromotion() {
DCHECK(!is_showing_ios_promotion_);
+ gfx::Rect bubble_bounds = GetBubbleBounds();
RemoveChildView(bookmark_details_view_.get());
is_showing_ios_promotion_ = true;
ios_promo_view_ = new DesktopIOSPromotionBubbleView(
@@ -411,6 +412,7 @@ void BookmarkBubbleView::ShowIOSPromotion() {
AddChildView(ios_promo_view_);
GetWidget()->UpdateWindowIcon();
GetWidget()->UpdateWindowTitle();
- SizeToContents();
+ // Resize the bubble so it has the same width as the parent bubble.
+ ios_promo_view_->UpdateBubbleHeight(bubble_bounds);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698