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

Unified Diff: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc

Issue 2908963002: Use buttons from DialogClientView in BookmakBubbleView. (Closed)
Patch Set: AddPaddingRow Created 3 years, 7 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.h ('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/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);
}
}
« no previous file with comments | « chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698