Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 boxed shown by the RDP control. | |
|
garykac
2013/04/15 18:23:49
s/boxed/boxes/
alexeypa (please no reviews)
2013/04/15 18:26:53
Done.
| |
| 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_ |
| OLD | NEW |