Index: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
diff --git a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
index f95e3f2ea1d65b4cbc7a7b969d13aa3fa1f94de4..0dbee7bda7e0a8ba5b1001e37090692a51be1b76 100644 |
--- a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
+++ b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
@@ -96,19 +96,16 @@ void DesktopIOSPromotionBubbleView::ButtonPressed(views::Button* sender, |
GetWidget()->Close(); |
} |
-void DesktopIOSPromotionBubbleView::UpdateBubbleHeight() { |
- gfx::Rect old_bounds = GetWidget()->GetWindowBoundsInScreen(); |
- old_bounds.set_height( |
- GetWidget()->GetRootView()->GetHeightForWidth(old_bounds.width())); |
- GetWidget()->SetBounds(old_bounds); |
-} |
- |
void DesktopIOSPromotionBubbleView::UpdateRecoveryPhoneLabel() { |
std::string number = promotion_controller_->GetUsersRecoveryPhoneNumber(); |
if (!number.empty()) { |
promotion_text_label_->SetText(desktop_ios_promotion::GetPromoText( |
promotion_controller_->entry_point(), number)); |
Layout(); |
- UpdateBubbleHeight(); |
+ views::Widget* widget = GetWidget(); |
+ gfx::Rect old_bounds = widget->GetWindowBoundsInScreen(); |
+ old_bounds.set_height( |
+ widget->GetRootView()->GetHeightForWidth(old_bounds.width())); |
+ widget->SetBounds(old_bounds); |
} |
} |