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

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: fix initializers 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
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698