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

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

Issue 2580663003: Autoresize the sign-in email confirmation dialog. (Closed)
Patch Set: Created 4 years 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 3602c83e94956c4fbedef46b80538dcba017da95..cf9b6dc3dccdb2c46a1d346b6775ec2ddd0f1783 100644
--- a/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc
+++ b/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc
@@ -21,7 +21,8 @@ namespace {
// Dialog size.
const int kDialogWidth = 448;
-const int kDialogHeight = 250;
+const int kDialogMinHeight = 200;
+const int kDialogMaxHeight = 700;
// Dialog action key;
const char kActionKey[] = "action";
@@ -74,7 +75,10 @@ void SigninEmailConfirmationDialog::AskForConfirmation(
}
void SigninEmailConfirmationDialog::Show() {
- dialog_delegate_ = ShowConstrainedWebDialog(profile_, this, web_contents_);
+ gfx::Size minSize(kDialogWidth, kDialogMinHeight);
+ gfx::Size maxSize(kDialogWidth, kDialogMaxHeight);
+ dialog_delegate_ = ShowConstrainedWebDialogWithAutoResize(
+ profile_, this, web_contents_, minSize, maxSize);
}
ui::ModalType SigninEmailConfirmationDialog::GetDialogModalType() const {
@@ -95,7 +99,8 @@ void SigninEmailConfirmationDialog::GetWebUIMessageHandlers(
}
void SigninEmailConfirmationDialog::GetDialogSize(gfx::Size* size) const {
- size->SetSize(kDialogWidth, kDialogHeight);
+ // Avoid setting a dialog size in here as this dialog auto-resizes (see
+ // method |SigninEmailConfirmationDialog::Show|.
}
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