OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CLIENT_SESSION_H_ | 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ |
6 #define REMOTING_HOST_CLIENT_SESSION_H_ | 6 #define REMOTING_HOST_CLIENT_SESSION_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
| 11 #include <vector> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "base/sequenced_task_runner_helpers.h" | 16 #include "base/sequenced_task_runner_helpers.h" |
16 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
17 #include "base/time/time.h" | 18 #include "base/time/time.h" |
18 #include "base/timer/timer.h" | 19 #include "base/timer/timer.h" |
19 #include "remoting/host/client_session_control.h" | 20 #include "remoting/host/client_session_control.h" |
20 #include "remoting/host/client_session_details.h" | 21 #include "remoting/host/client_session_details.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 }; | 89 }; |
89 | 90 |
90 // |event_handler| and |desktop_environment_factory| must outlive |this|. | 91 // |event_handler| and |desktop_environment_factory| must outlive |this|. |
91 // All |HostExtension|s in |extensions| must outlive |this|. | 92 // All |HostExtension|s in |extensions| must outlive |this|. |
92 ClientSession(EventHandler* event_handler, | 93 ClientSession(EventHandler* event_handler, |
93 std::unique_ptr<protocol::ConnectionToClient> connection, | 94 std::unique_ptr<protocol::ConnectionToClient> connection, |
94 DesktopEnvironmentFactory* desktop_environment_factory, | 95 DesktopEnvironmentFactory* desktop_environment_factory, |
95 const DesktopEnvironmentOptions& desktop_environment_options, | 96 const DesktopEnvironmentOptions& desktop_environment_options, |
96 const base::TimeDelta& max_duration, | 97 const base::TimeDelta& max_duration, |
97 scoped_refptr<protocol::PairingRegistry> pairing_registry, | 98 scoped_refptr<protocol::PairingRegistry> pairing_registry, |
98 const std::vector<HostExtension*>& extensions); | 99 const std::vector<std::unique_ptr<HostExtension>>& extensions); |
99 ~ClientSession() override; | 100 ~ClientSession() override; |
100 | 101 |
101 // Returns the set of capabilities negotiated between client and host. | 102 // Returns the set of capabilities negotiated between client and host. |
102 const std::string& capabilities() const { return capabilities_; } | 103 const std::string& capabilities() const { return capabilities_; } |
103 | 104 |
104 // protocol::HostStub interface. | 105 // protocol::HostStub interface. |
105 void NotifyClientResolution( | 106 void NotifyClientResolution( |
106 const protocol::ClientResolution& resolution) override; | 107 const protocol::ClientResolution& resolution) override; |
107 void ControlVideo(const protocol::VideoControl& video_control) override; | 108 void ControlVideo(const protocol::VideoControl& video_control) override; |
108 void ControlAudio(const protocol::AudioControl& audio_control) override; | 109 void ControlAudio(const protocol::AudioControl& audio_control) override; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // Used to disable callbacks to |this| once DisconnectSession() has been | 249 // Used to disable callbacks to |this| once DisconnectSession() has been |
249 // called. | 250 // called. |
250 base::WeakPtrFactory<ClientSessionControl> weak_factory_; | 251 base::WeakPtrFactory<ClientSessionControl> weak_factory_; |
251 | 252 |
252 DISALLOW_COPY_AND_ASSIGN(ClientSession); | 253 DISALLOW_COPY_AND_ASSIGN(ClientSession); |
253 }; | 254 }; |
254 | 255 |
255 } // namespace remoting | 256 } // namespace remoting |
256 | 257 |
257 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 258 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
OLD | NEW |