Chromium Code Reviews| Index: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm |
| diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm |
| index 866b2192c788e88f7ec116760c18e0023cf03006..90797d7d8ce0966c9eb5567a5b3f3f7e197c5d44 100644 |
| --- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm |
| +++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm |
| @@ -232,6 +232,14 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver, |
| constrained_window_->CloseWebContentsModalDialog(); |
| } |
| +- (void)dealloc { |
| + //auto closeButton = [[self window] standardWindowButton:NSWindowCloseButton]; |
| + //[closeButton setTarget:nil]; |
|
groby-ooo-7-16
2015/09/12 00:42:16
Remove commented out code
anthonyvd
2015/09/14 23:59:18
oops, missed this. Thanks!
|
| + constrained_window_->CloseWebContentsModalDialog(); |
| + |
| + [super dealloc]; |
| +} |
| + |
| @end |
| // Window controller for the User Manager view. |
| @@ -290,6 +298,13 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver, |
| webContentsDelegate_.reset(new UserManagerWebContentsDelegate()); |
| webContents_->SetDelegate(webContentsDelegate_.get()); |
| + web_modal::WebContentsModalDialogManager::CreateForWebContents( |
| + webContents_.get()); |
| + modal_manager_delegate_.reset( |
| + new UserManagerModalManagerDelegate([[self window] contentView])); |
| + web_modal::WebContentsModalDialogManager::FromWebContents( |
| + webContents_.get())->SetDelegate(modal_manager_delegate_.get()); |
| + |
| [[NSNotificationCenter defaultCenter] |
| addObserver:self |
| selector:@selector(windowWillClose:) |
| @@ -351,14 +366,6 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver, |
| } |
| - (void)showReauthDialogWithProfile:(Profile*)profile email:(std::string)email { |
| - // Make sure there's a WebContentsModalDialogManager for this UserManager's |
| - // web contents. |
| - web_modal::WebContentsModalDialogManager::CreateForWebContents( |
| - webContents_.get()); |
| - modal_manager_delegate_.reset( |
| - new UserManagerModalManagerDelegate([[self window] contentView])); |
| - web_modal::WebContentsModalDialogManager::FromWebContents( |
| - webContents_.get())->SetDelegate(modal_manager_delegate_.get()); |
| reauth_window_controller_.reset( |
| [[ReauthDialogWindowController alloc] |
| initWithProfile:profile |