Skip to content

Commit 015acc2

Browse files
committed
[WIN] support for login dialog queue
1 parent 6683bf6 commit 015acc2

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/browser/shell_login_dialog_win.cc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ INT_PTR CALLBACK ShellLoginDialog::DialogProc(HWND dialog,
5353
owner->UserCancelledAuth();
5454
DestroyWindow(owner->dialog_win_);
5555
owner->dialog_win_ = NULL;
56+
ReleaseSoon();
5657
break;
5758
}
5859
case WM_COMMAND: {
@@ -75,7 +76,7 @@ INT_PTR CALLBACK ShellLoginDialog::DialogProc(HWND dialog,
7576
NOTREACHED();
7677
}
7778

78-
break;
79+
break;
7980
}
8081
default:
8182
return DefWindowProc(dialog, message, wparam, lparam);
@@ -104,16 +105,22 @@ void ShellLoginDialog::PlatformCreateDialog(const string16& message) {
104105
gfx::NativeWindow parent_window =
105106
web_contents->GetView()->GetTopLevelNativeWindow();
106107
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,
109110
DialogProc, reinterpret_cast<LPARAM>(this));
111+
}
112+
113+
void ShellLoginDialog::PlatformShowDialog() {
114+
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
110115
ShowWindow(dialog_win_, SW_SHOWNORMAL);
111116
}
112117

113118
void ShellLoginDialog::PlatformCleanUp() {
114119
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+
}
117124
}
118125

119126
void ShellLoginDialog::PlatformRequestCancelled() {

0 commit comments

Comments
 (0)