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

Side by Side Diff: chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc

Issue 2099233003: Fix a crash due to the modal signin being closed before being shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/profiles/signin_view_controller_delegate_views .h" 5 #include "chrome/browser/ui/views/profiles/signin_view_controller_delegate_views .h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 9 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
10 #include "chrome/browser/signin/signin_promo.h" 10 #include "chrome/browser/signin/signin_promo.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 bool SigninViewControllerDelegateViews::ShouldShowCloseButton() const { 68 bool SigninViewControllerDelegateViews::ShouldShowCloseButton() const {
69 return false; 69 return false;
70 } 70 }
71 71
72 int SigninViewControllerDelegateViews::GetDialogButtons() const { 72 int SigninViewControllerDelegateViews::GetDialogButtons() const {
73 return ui::DIALOG_BUTTON_NONE; 73 return ui::DIALOG_BUTTON_NONE;
74 } 74 }
75 75
76 void SigninViewControllerDelegateViews::PerformClose() { 76 void SigninViewControllerDelegateViews::PerformClose() {
77 modal_signin_widget_->Close(); 77 if (modal_signin_widget_)
78 modal_signin_widget_->Close();
78 } 79 }
79 80
80 void SigninViewControllerDelegateViews::ResizeNativeView(int height) { 81 void SigninViewControllerDelegateViews::ResizeNativeView(int height) {
81 int max_height = browser_ 82 int max_height = browser_
82 ->window() 83 ->window()
83 ->GetWebContentsModalDialogHost() 84 ->GetWebContentsModalDialogHost()
84 ->GetMaximumDialogSize().height(); 85 ->GetMaximumDialogSize().height();
85 content_view_->SetPreferredSize( 86 content_view_->SetPreferredSize(
86 gfx::Size(kModalDialogWidth, std::min(height, max_height))); 87 gfx::Size(kModalDialogWidth, std::min(height, max_height)));
87 content_view_->Layout(); 88 content_view_->Layout();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 SigninViewControllerDelegate* 169 SigninViewControllerDelegate*
169 SigninViewControllerDelegate::CreateSyncConfirmationDelegate( 170 SigninViewControllerDelegate::CreateSyncConfirmationDelegate(
170 SigninViewController* signin_view_controller, 171 SigninViewController* signin_view_controller,
171 Browser* browser) { 172 Browser* browser) {
172 return new SigninViewControllerDelegateViews( 173 return new SigninViewControllerDelegateViews(
173 signin_view_controller, 174 signin_view_controller,
174 SigninViewControllerDelegateViews::CreateSyncConfirmationWebView(browser), 175 SigninViewControllerDelegateViews::CreateSyncConfirmationWebView(browser),
175 browser, true); 176 browser, true);
176 } 177 }
OLDNEW
« 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