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_CLIENT_H_ | 5 #ifndef REMOTING_HOST_WIN_RDP_CLIENT_H_ |
6 #define REMOTING_HOST_WIN_RDP_CLIENT_H_ | 6 #define REMOTING_HOST_WIN_RDP_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
14 #include "third_party/skia/include/core/SkSize.h" | |
15 | 14 |
16 namespace base { | 15 namespace base { |
17 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
18 } // namespace | 17 } // namespace base |
| 18 |
| 19 namespace webrtc { |
| 20 class DesktopSize; |
| 21 } // namespace webrtc |
19 | 22 |
20 namespace remoting { | 23 namespace remoting { |
21 | 24 |
22 // Establishes a loopback RDP connection to spawn a new Windows session. | 25 // Establishes a loopback RDP connection to spawn a new Windows session. |
23 class RdpClient : public base::NonThreadSafe { | 26 class RdpClient : public base::NonThreadSafe { |
24 public: | 27 public: |
25 class EventHandler { | 28 class EventHandler { |
26 public: | 29 public: |
27 virtual ~EventHandler() {} | 30 virtual ~EventHandler() {} |
28 | 31 |
29 // Notifies the event handler that an RDP connection has been established | 32 // Notifies the event handler that an RDP connection has been established |
30 // successfully. | 33 // successfully. |
31 virtual void OnRdpConnected() = 0; | 34 virtual void OnRdpConnected() = 0; |
32 | 35 |
33 // Notifies that the RDP connection has been closed. | 36 // Notifies that the RDP connection has been closed. |
34 virtual void OnRdpClosed() = 0; | 37 virtual void OnRdpClosed() = 0; |
35 }; | 38 }; |
36 | 39 |
37 RdpClient( | 40 RdpClient( |
38 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 41 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
39 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 42 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
40 const SkISize& screen_size, | 43 const webrtc::DesktopSize& screen_size, |
41 const std::string& terminal_id, | 44 const std::string& terminal_id, |
42 EventHandler* event_handler); | 45 EventHandler* event_handler); |
43 virtual ~RdpClient(); | 46 virtual ~RdpClient(); |
44 | 47 |
45 // Sends Secure Attention Sequence to the session. | 48 // Sends Secure Attention Sequence to the session. |
46 void InjectSas(); | 49 void InjectSas(); |
47 | 50 |
48 private: | 51 private: |
49 // The actual implementation resides in Core class. | 52 // The actual implementation resides in Core class. |
50 class Core; | 53 class Core; |
51 scoped_refptr<Core> core_; | 54 scoped_refptr<Core> core_; |
52 | 55 |
53 DISALLOW_COPY_AND_ASSIGN(RdpClient); | 56 DISALLOW_COPY_AND_ASSIGN(RdpClient); |
54 }; | 57 }; |
55 | 58 |
56 } // namespace remoting | 59 } // namespace remoting |
57 | 60 |
58 #endif // REMOTING_HOST_WIN_RDP_CLIENT_H_ | 61 #endif // REMOTING_HOST_WIN_RDP_CLIENT_H_ |
OLD | NEW |