Chromium Code Reviews| 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 <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 namespace base { | 28 namespace base { |
| 29 class SingleThreadTaskRunner; | 29 class SingleThreadTaskRunner; |
| 30 } // namespace base | 30 } // namespace base |
| 31 | 31 |
| 32 namespace remoting { | 32 namespace remoting { |
| 33 | 33 |
| 34 class AudioEncoder; | 34 class AudioEncoder; |
| 35 class AudioScheduler; | 35 class AudioScheduler; |
| 36 struct ClientSessionTraits; | 36 struct ClientSessionTraits; |
| 37 class DesktopEnvironment; | 37 class DesktopEnvironment; |
| 38 class DesktopEnvironmentFactory; | |
| 38 class ScreenRecorder; | 39 class ScreenRecorder; |
| 39 class VideoEncoder; | 40 class VideoEncoder; |
| 40 class VideoFrameCapturer; | 41 class VideoFrameCapturer; |
| 41 | 42 |
| 42 // A ClientSession keeps a reference to a connection to a client, and maintains | 43 // A ClientSession keeps a reference to a connection to a client, and maintains |
| 43 // per-client state. | 44 // per-client state. |
| 44 class ClientSession | 45 class ClientSession |
| 45 : public base::RefCountedThreadSafe<ClientSession, ClientSessionTraits>, | 46 : public base::RefCountedThreadSafe<ClientSession, ClientSessionTraits>, |
| 46 public protocol::HostStub, | 47 public protocol::HostStub, |
| 47 public protocol::ConnectionToClient::EventHandler, | 48 public protocol::ConnectionToClient::EventHandler, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 | 84 |
| 84 protected: | 85 protected: |
| 85 virtual ~EventHandler() {} | 86 virtual ~EventHandler() {} |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 ClientSession(EventHandler* event_handler, | 89 ClientSession(EventHandler* event_handler, |
| 89 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 90 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
| 90 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, | 91 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, |
| 91 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 92 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
| 92 scoped_ptr<protocol::ConnectionToClient> connection, | 93 scoped_ptr<protocol::ConnectionToClient> connection, |
| 93 scoped_ptr<DesktopEnvironment> desktop_environment, | 94 DesktopEnvironmentFactory* desktop_environment_factory, |
|
Wez
2012/10/17 22:04:24
nit: Add a comment to clarify that |desktop_enviro
alexeypa (please no reviews)
2012/10/17 22:46:56
Done.
| |
| 94 const base::TimeDelta& max_duration); | 95 const base::TimeDelta& max_duration); |
| 95 | 96 |
| 96 // protocol::HostStub interface. | 97 // protocol::HostStub interface. |
| 97 virtual void NotifyClientDimensions( | 98 virtual void NotifyClientDimensions( |
| 98 const protocol::ClientDimensions& dimensions) OVERRIDE; | 99 const protocol::ClientDimensions& dimensions) OVERRIDE; |
| 99 virtual void ControlVideo( | 100 virtual void ControlVideo( |
| 100 const protocol::VideoControl& video_control) OVERRIDE; | 101 const protocol::VideoControl& video_control) OVERRIDE; |
| 101 | 102 |
| 102 // protocol::ConnectionToClient::EventHandler interface. | 103 // protocol::ConnectionToClient::EventHandler interface. |
| 103 virtual void OnConnectionAuthenticated( | 104 virtual void OnConnectionAuthenticated( |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 }; | 232 }; |
| 232 | 233 |
| 233 // Destroys |ClienSession| instances on the network thread. | 234 // Destroys |ClienSession| instances on the network thread. |
| 234 struct ClientSessionTraits { | 235 struct ClientSessionTraits { |
| 235 static void Destruct(const ClientSession* client); | 236 static void Destruct(const ClientSession* client); |
| 236 }; | 237 }; |
| 237 | 238 |
| 238 } // namespace remoting | 239 } // namespace remoting |
| 239 | 240 |
| 240 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 241 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
| OLD | NEW |