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

Unified Diff: chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc

Issue 2685163003: Avoid multiple displays of the sign-in dialogs. (Closed)
Patch Set: Ready for reviews 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 | « chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.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/profiles/signin_view_controller_delegate_views.cc
diff --git a/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc b/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
index 83f947ef4e68a24612efaa5dfcb870cea679a72c..452fd9e93381939ebdd3c4ad5d860d1b12a22a00 100644
--- a/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
+++ b/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
@@ -49,7 +49,6 @@ SigninViewControllerDelegateViews::SigninViewControllerDelegateViews(
content_view_(content_view.release()),
modal_signin_widget_(nullptr),
dialog_modal_type_(dialog_modal_type),
- wait_for_size_(wait_for_size),
browser_(browser) {
DCHECK(browser_);
DCHECK(browser_->tab_strip_model()->GetActiveWebContents())
@@ -57,7 +56,7 @@ SigninViewControllerDelegateViews::SigninViewControllerDelegateViews(
DCHECK(dialog_modal_type == ui::MODAL_TYPE_CHILD ||
dialog_modal_type == ui::MODAL_TYPE_WINDOW)
<< "Unsupported dialog modal type " << dialog_modal_type;
- if (!wait_for_size_)
+ if (!wait_for_size)
DisplayModal();
}
@@ -107,7 +106,7 @@ void SigninViewControllerDelegateViews::ResizeNativeView(int height) {
gfx::Size(kModalDialogWidth, std::min(height, max_height)));
content_view_->Layout();
- if (wait_for_size_) {
+ if (!modal_signin_widget_) {
// The modal wasn't displayed yet so just show it with the already resized
// view.
DisplayModal();
@@ -115,6 +114,8 @@ void SigninViewControllerDelegateViews::ResizeNativeView(int height) {
}
void SigninViewControllerDelegateViews::DisplayModal() {
+ DCHECK(!modal_signin_widget_);
+
content::WebContents* host_web_contents =
browser_->tab_strip_model()->GetActiveWebContents();
« no previous file with comments | « chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698