Chromium Code Reviews| 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..c0f2fb675a570d9f6a1c029db0dfa992f4dafe4a 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,15 @@ 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(); |
| + gfx::Rect old_bounds = GetWidget()->GetWindowBoundsInScreen(); |
|
Peter Kasting
2017/05/31 02:43:31
Nit: Maybe pull GetWidget() out into a temp
tapted
2017/05/31 04:27:49
Done.
|
| + old_bounds.set_height( |
| + GetWidget()->GetRootView()->GetHeightForWidth(old_bounds.width())); |
| + GetWidget()->SetBounds(old_bounds); |
| } |
| } |