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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/sequence_checker.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
17 } // namespace base | 17 } // namespace base |
18 | 18 |
19 namespace remoting { | 19 namespace remoting { |
20 | 20 |
21 class ScreenResolution; | 21 class ScreenResolution; |
22 | 22 |
23 // Establishes a loopback RDP connection to spawn a new Windows session. | 23 // Establishes a loopback RDP connection to spawn a new Windows session. |
24 class RdpClient : public base::NonThreadSafe { | 24 class RdpClient { |
25 public: | 25 public: |
26 class EventHandler { | 26 class EventHandler { |
27 public: | 27 public: |
28 virtual ~EventHandler() {} | 28 virtual ~EventHandler() {} |
29 | 29 |
30 // Notifies the event handler that an RDP connection has been established | 30 // Notifies the event handler that an RDP connection has been established |
31 // successfully. | 31 // successfully. |
32 virtual void OnRdpConnected() = 0; | 32 virtual void OnRdpConnected() = 0; |
33 | 33 |
34 // Notifies that the RDP connection has been closed. | 34 // Notifies that the RDP connection has been closed. |
(...skipping 12 matching lines...) Expand all Loading... |
47 void InjectSas(); | 47 void InjectSas(); |
48 | 48 |
49 // Change the resolution of the desktop. | 49 // Change the resolution of the desktop. |
50 void ChangeResolution(const ScreenResolution& resolution); | 50 void ChangeResolution(const ScreenResolution& resolution); |
51 | 51 |
52 private: | 52 private: |
53 // The actual implementation resides in Core class. | 53 // The actual implementation resides in Core class. |
54 class Core; | 54 class Core; |
55 scoped_refptr<Core> core_; | 55 scoped_refptr<Core> core_; |
56 | 56 |
| 57 SEQUENCE_CHECKER(sequence_checker_); |
| 58 |
57 DISALLOW_COPY_AND_ASSIGN(RdpClient); | 59 DISALLOW_COPY_AND_ASSIGN(RdpClient); |
58 }; | 60 }; |
59 | 61 |
60 } // namespace remoting | 62 } // namespace remoting |
61 | 63 |
62 #endif // REMOTING_HOST_WIN_RDP_CLIENT_H_ | 64 #endif // REMOTING_HOST_WIN_RDP_CLIENT_H_ |
OLD | NEW |