| 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_DESKTOP_SESSION_H_ | 5 #ifndef REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_ |
| 6 #define REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_ | 6 #define REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <atlctl.h> | 10 #include <atlctl.h> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // ATL::CComObjectCached) for classes hosted in a DLL. This class is compiled | 34 // ATL::CComObjectCached) for classes hosted in a DLL. This class is compiled |
| 35 // into a DLL but it is registered as an out-of-process class, so its class | 35 // into a DLL but it is registered as an out-of-process class, so its class |
| 36 // factory should not use locking. | 36 // factory should not use locking. |
| 37 typedef ATL::CComCreator<ATL::CComObjectNoLock<ATL::CComClassFactory> > | 37 typedef ATL::CComCreator<ATL::CComObjectNoLock<ATL::CComClassFactory> > |
| 38 _ClassFactoryCreatorClass; | 38 _ClassFactoryCreatorClass; |
| 39 | 39 |
| 40 RdpDesktopSession(); | 40 RdpDesktopSession(); |
| 41 ~RdpDesktopSession() override; | 41 ~RdpDesktopSession() override; |
| 42 | 42 |
| 43 // IRdpDesktopSession implementation. | 43 // IRdpDesktopSession implementation. |
| 44 STDMETHOD(Connect)(long width, | 44 STDMETHOD(Connect) |
| 45 long height, | 45 (long width, |
| 46 BSTR terminal_id, | 46 long height, |
| 47 IRdpDesktopSessionEventHandler* event_handler) override; | 47 BSTR terminal_id, |
| 48 DWORD port_number, |
| 49 IRdpDesktopSessionEventHandler* event_handler) override; |
| 48 STDMETHOD(Disconnect)() override; | 50 STDMETHOD(Disconnect)() override; |
| 49 STDMETHOD(ChangeResolution)(long width, long height) override; | 51 STDMETHOD(ChangeResolution)(long width, long height) override; |
| 50 STDMETHOD(InjectSas)() override; | 52 STDMETHOD(InjectSas)() override; |
| 51 | 53 |
| 52 DECLARE_NO_REGISTRY() | 54 DECLARE_NO_REGISTRY() |
| 53 | 55 |
| 54 private: | 56 private: |
| 55 // RdpClient::EventHandler interface. | 57 // RdpClient::EventHandler interface. |
| 56 void OnRdpConnected() override; | 58 void OnRdpConnected() override; |
| 57 void OnRdpClosed() override; | 59 void OnRdpClosed() override; |
| 58 | 60 |
| 59 BEGIN_COM_MAP(RdpDesktopSession) | 61 BEGIN_COM_MAP(RdpDesktopSession) |
| 60 COM_INTERFACE_ENTRY(IRdpDesktopSession) | 62 COM_INTERFACE_ENTRY(IRdpDesktopSession) |
| 61 COM_INTERFACE_ENTRY(IUnknown) | 63 COM_INTERFACE_ENTRY(IUnknown) |
| 62 END_COM_MAP() | 64 END_COM_MAP() |
| 63 | 65 |
| 64 // Implements loading and instantiation of the RDP ActiveX client. | 66 // Implements loading and instantiation of the RDP ActiveX client. |
| 65 std::unique_ptr<RdpClient> client_; | 67 std::unique_ptr<RdpClient> client_; |
| 66 | 68 |
| 67 // Holds a reference to the caller's EventHandler, through which notifications | 69 // Holds a reference to the caller's EventHandler, through which notifications |
| 68 // are dispatched. Released in Disconnect(), to prevent further notifications. | 70 // are dispatched. Released in Disconnect(), to prevent further notifications. |
| 69 base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler_; | 71 base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler_; |
| 70 | 72 |
| 71 DECLARE_PROTECT_FINAL_CONSTRUCT() | 73 DECLARE_PROTECT_FINAL_CONSTRUCT() |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 } // namespace remoting | 76 } // namespace remoting |
| 75 | 77 |
| 76 #endif // REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_ | 78 #endif // REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_ |
| OLD | NEW |