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

Unified Diff: chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc

Issue 2682123002: Set the initial dialog width when the sign-in email confirmation dialog is presented. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc
diff --git a/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc b/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc
index 62074313d3149d785c6b28847a73ebbd3fa40361..57dc18913769987d8c4aae97b552abe82fa0077a 100644
--- a/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc
+++ b/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc
@@ -140,8 +140,13 @@ void SigninEmailConfirmationDialog::GetWebUIMessageHandlers(
std::vector<content::WebUIMessageHandler*>* handlers) const {}
void SigninEmailConfirmationDialog::GetDialogSize(gfx::Size* size) const {
- // Avoid setting a dialog size in here as this dialog auto-resizes (see
- // method |SigninEmailConfirmationDialog::Show|.
+ DCHECK(size);
+
+ // Set the dialog width if it's not set, so that the dialog is center-aligned
+ // horizontally when it appears. Avoid setting a dialog height in here as
+ // this dialog auto-resizes.
+ if (size->IsEmpty())
+ size->set_width(kDialogWidth);
}
std::string SigninEmailConfirmationDialog::GetDialogArgs() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698