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

Side by Side Diff: remoting/host/win/rdp_client_window.h

Issue 14261008: Cancel any modal UI shown by the RDP control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/win/rdp_client_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_ 5 #ifndef REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_
6 #define REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_ 6 #define REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 #include <atlcrack.h> 10 #include <atlcrack.h>
11 #include <atlctl.h> 11 #include <atlctl.h>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/memory/ref_counted.h"
14 #include "base/message_loop.h" 15 #include "base/message_loop.h"
15 #include "base/win/scoped_comptr.h" 16 #include "base/win/scoped_comptr.h"
16 #include "net/base/ip_endpoint.h" 17 #include "net/base/ip_endpoint.h"
17 #include "third_party/skia/include/core/SkSize.h" 18 #include "third_party/skia/include/core/SkSize.h"
18 19
19 #import "PROGID:MsTscAx.MsTscAx" \ 20 #import "PROGID:MsTscAx.MsTscAx" \
20 exclude("wireHWND", "_RemotableHandle", "__MIDL_IWinTypes_0009"), \ 21 exclude("wireHWND", "_RemotableHandle", "__MIDL_IWinTypes_0009"), \
21 rename_namespace("mstsc") raw_interfaces_only no_implementation 22 rename_namespace("mstsc") raw_interfaces_only no_implementation
22 23
23 namespace remoting { 24 namespace remoting {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Releases the RDP ActiveX control interfaces. 99 // Releases the RDP ActiveX control interfaces.
99 void OnDestroy(); 100 void OnDestroy();
100 101
101 BEGIN_SINK_MAP(RdpClientWindow) 102 BEGIN_SINK_MAP(RdpClientWindow)
102 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 2, OnConnected) 103 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 2, OnConnected)
103 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 4, OnDisconnected) 104 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 4, OnDisconnected)
104 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 10, OnFatalError) 105 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 10, OnFatalError)
105 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 15, OnConfirmClose) 106 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 15, OnConfirmClose)
106 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 18, 107 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 18,
107 OnAuthenticationWarningDisplayed) 108 OnAuthenticationWarningDisplayed)
109 SINK_ENTRY_EX(1, __uuidof(mstsc::IMsTscAxEvents), 19,
110 OnAuthenticationWarningDismissed)
108 END_SINK_MAP() 111 END_SINK_MAP()
109 112
110 // mstsc::IMsTscAxEvents notifications. 113 // mstsc::IMsTscAxEvents notifications.
111 STDMETHOD(OnAuthenticationWarningDisplayed)(); 114 STDMETHOD(OnAuthenticationWarningDisplayed)();
115 STDMETHOD(OnAuthenticationWarningDismissed)();
112 STDMETHOD(OnConnected)(); 116 STDMETHOD(OnConnected)();
113 STDMETHOD(OnDisconnected)(long reason); 117 STDMETHOD(OnDisconnected)(long reason);
114 STDMETHOD(OnFatalError)(long error_code); 118 STDMETHOD(OnFatalError)(long error_code);
115 STDMETHOD(OnConfirmClose)(VARIANT_BOOL* allow_close); 119 STDMETHOD(OnConfirmClose)(VARIANT_BOOL* allow_close);
116 120
117 // Wrappers for the event handler's methods that make sure that 121 // Wrappers for the event handler's methods that make sure that
118 // OnDisconnected() is the last notification delivered and is delevered 122 // OnDisconnected() is the last notification delivered and is delevered
119 // only once. 123 // only once.
120 void NotifyConnected(); 124 void NotifyConnected();
121 void NotifyDisconnected(); 125 void NotifyDisconnected();
122 126
123 // Invoked to report connect/disconnect events. 127 // Invoked to report connect/disconnect events.
124 EventHandler* event_handler_; 128 EventHandler* event_handler_;
125 129
126 // Contains the requested dimensions of the screen. 130 // Contains the requested dimensions of the screen.
127 SkISize screen_size_; 131 SkISize screen_size_;
128 132
129 // The endpoint to connect to. 133 // The endpoint to connect to.
130 net::IPEndPoint server_endpoint_; 134 net::IPEndPoint server_endpoint_;
131 135
132 // Interfaces exposed by the RDP ActiveX control. 136 // Interfaces exposed by the RDP ActiveX control.
133 base::win::ScopedComPtr<mstsc::IMsRdpClient> client_; 137 base::win::ScopedComPtr<mstsc::IMsRdpClient> client_;
134 base::win::ScopedComPtr<mstsc::IMsRdpClientAdvancedSettings> client_settings_; 138 base::win::ScopedComPtr<mstsc::IMsRdpClientAdvancedSettings> client_settings_;
139
140 // Used to cancel modal dialog boxes shown by the RDP control.
141 class WindowHook;
142 scoped_refptr<WindowHook> window_activate_hook_;
135 }; 143 };
136 144
137 } // namespace remoting 145 } // namespace remoting
138 146
139 #endif // REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_ 147 #endif // REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/win/rdp_client_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698