@@ -53,6 +53,7 @@ INT_PTR CALLBACK ShellLoginDialog::DialogProc(HWND dialog,
53
53
owner->UserCancelledAuth ();
54
54
DestroyWindow (owner->dialog_win_ );
55
55
owner->dialog_win_ = NULL ;
56
+ ReleaseSoon ();
56
57
break ;
57
58
}
58
59
case WM_COMMAND: {
@@ -75,7 +76,7 @@ INT_PTR CALLBACK ShellLoginDialog::DialogProc(HWND dialog,
75
76
NOTREACHED ();
76
77
}
77
78
78
- break ;
79
+ break ;
79
80
}
80
81
default :
81
82
return DefWindowProc (dialog, message, wparam, lparam);
@@ -104,16 +105,22 @@ void ShellLoginDialog::PlatformCreateDialog(const string16& message) {
104
105
gfx::NativeWindow parent_window =
105
106
web_contents->GetView ()->GetTopLevelNativeWindow ();
106
107
message_text_ = message;
107
- dialog_win_ = CreateDialogParam (GetModuleHandle (0 ),
108
- MAKEINTRESOURCE (IDD_LOGIN), parent_window,
108
+ dialog_win_ = CreateDialogParam (GetModuleHandle (0 ),
109
+ MAKEINTRESOURCE (IDD_LOGIN), parent_window,
109
110
DialogProc, reinterpret_cast <LPARAM>(this ));
111
+ }
112
+
113
+ void ShellLoginDialog::PlatformShowDialog () {
114
+ DCHECK (BrowserThread::CurrentlyOn (BrowserThread::UI));
110
115
ShowWindow (dialog_win_, SW_SHOWNORMAL);
111
116
}
112
117
113
118
void ShellLoginDialog::PlatformCleanUp () {
114
119
DCHECK (BrowserThread::CurrentlyOn (BrowserThread::UI));
115
- if (this ->dialog_win_ )
116
- DestroyWindow (this ->dialog_win_ );
120
+ if (dialog_win_) {
121
+ DestroyWindow (dialog_win_);
122
+ dialog_win_ = NULL ;
123
+ }
117
124
}
118
125
119
126
void ShellLoginDialog::PlatformRequestCancelled () {
0 commit comments