summaryrefslogtreecommitdiffstats
path: root/remoting/host/win
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-02 00:17:03 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-02 00:17:03 +0000
commitbc47943053961641026175253f348f94f956389b (patch)
tree22aa3b9c0221debe74dbd591b231966ac9079dae /remoting/host/win
parent8d7e055fb563d11316c81586921ce0049d89b634 (diff)
downloadchromium_src-bc47943053961641026175253f348f94f956389b.zip
chromium_src-bc47943053961641026175253f348f94f956389b.tar.gz
chromium_src-bc47943053961641026175253f348f94f956389b.tar.bz2
Close the RDP connection if the authentication warning dialog is about to be shown.
BUG=137696 Review URL: https://chromiumcodereview.appspot.com/13236004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191713 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/win')
-rw-r--r--remoting/host/win/rdp_client_window.cc15
-rw-r--r--remoting/host/win/rdp_client_window.h3
2 files changed, 15 insertions, 3 deletions
diff --git a/remoting/host/win/rdp_client_window.cc b/remoting/host/win/rdp_client_window.cc
index 8269079..fa02a80 100644
--- a/remoting/host/win/rdp_client_window.cc
+++ b/remoting/host/win/rdp_client_window.cc
@@ -50,9 +50,8 @@ bool RdpClientWindow::Connect(const SkISize& screen_size) {
}
void RdpClientWindow::Disconnect() {
- DCHECK(m_hWnd);
-
- SendMessage(WM_CLOSE);
+ if (m_hWnd)
+ SendMessage(WM_CLOSE);
}
void RdpClientWindow::OnClose() {
@@ -200,6 +199,16 @@ void RdpClientWindow::OnDestroy() {
client_settings_.Release();
}
+HRESULT RdpClientWindow::OnAuthenticationWarningDisplayed() {
+ LOG(ERROR) << "RDP: authentication warning is about to be shown. Closing "
+ "the connection because the modal UI will block any further "
+ "progress";
+
+ DestroyWindow();
+ NotifyDisconnected();
+ return S_OK;
+}
+
HRESULT RdpClientWindow::OnConnected() {
VLOG(1) << "RDP: successfully connected to " << server_endpoint_.ToString();
diff --git a/remoting/host/win/rdp_client_window.h b/remoting/host/win/rdp_client_window.h
index ee8d9fc..33de1d3 100644
--- a/remoting/host/win/rdp_client_window.h
+++ b/remoting/host/win/rdp_client_window.h
@@ -103,9 +103,12 @@ class RdpClientWindow
SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 4, OnDisconnected)
SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 10, OnFatalError)
SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 15, OnConfirmClose)
+ SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 18,
+ OnAuthenticationWarningDisplayed)
END_SINK_MAP()
// mstsc::IMsTscAxEvents notifications.
+ STDMETHOD(OnAuthenticationWarningDisplayed)();
STDMETHOD(OnConnected)();
STDMETHOD(OnDisconnected)(long reason);
STDMETHOD(OnFatalError)(long error_code);