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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_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: Comments 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
« no previous file with comments | « chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698