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

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: merge 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 cdf2f6eafd3ba7bc6c547c893235873cce492f46..cb65bf63633e5c179ec583f4b7dadb493d1a41ed 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -831,12 +831,19 @@ void ManagePasswordsBubbleView::Refresh() {
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.
+ gfx::Rect bubble_bounds = GetWidget()->GetWindowBoundsInScreen();
+ bubble_bounds.set_height(
+ GetWidget()->GetRootView()->GetHeightForWidth(bubble_bounds.width()));
+ GetWidget()->SetBounds(bubble_bounds);
+ } 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