Chromium Code Reviews| Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| index 31b70dac9c8aff19cd40e29dffdb63dfc4cca9b8..50a69f0ab2d6b058e3c40c1c651655098ec59b0a 100644 |
| --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| @@ -829,15 +829,23 @@ bool ManagePasswordsBubbleView::ShouldShowCloseButton() const { |
| } |
| void ManagePasswordsBubbleView::Refresh() { |
| + gfx::Rect bubble_bounds = GetBubbleBounds(); |
| RemoveAllChildViews(true); |
| initially_focused_view_ = NULL; |
| CreateChild(); |
| - |
| // Show/hide the close button. |
| GetWidget()->non_client_view()->ResetWindowControls(); |
| GetWidget()->UpdateWindowIcon(); |
| GetWidget()->UpdateWindowTitle(); |
| - SizeToContents(); |
| + if (model_.state() == password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { |
| + // Update the height and keep the existing width. |
| + bubble_bounds.set_height( |
| + GetWidget()->GetRootView()->GetHeightForWidth(bubble_bounds.width())); |
| + GetWidget()->SetBounds(bubble_bounds); |
| + GetWidget()->GetRootView()->Layout(); |
|
vasilii
2017/04/18 14:44:25
Is it needed?
mrefaat
2017/04/18 17:01:09
removed.
|
| + } else { |
| + SizeToContents(); |
| + } |
| } |
| void ManagePasswordsBubbleView::CreateChild() { |