Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: remoting/host/client_session.h

Issue 11028128: [Chromoting] Request the daemon to open a terminal once a connection has been accepted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 30 matching lines...) Expand all
78 79
79 // Called when the initial client dimensions are received, and when they 80 // Called when the initial client dimensions are received, and when they
80 // change. 81 // change.
81 virtual void OnClientDimensionsChanged(ClientSession* client, 82 virtual void OnClientDimensionsChanged(ClientSession* client,
82 const SkISize& size) = 0; 83 const SkISize& size) = 0;
83 84
84 protected: 85 protected:
85 virtual ~EventHandler() {} 86 virtual ~EventHandler() {}
86 }; 87 };
87 88
89 // |event_handler| must outlive |this|. |desktop_environment_factory| is only
90 // used by the constructor to create an instance of DesktopEnvironment.
88 ClientSession(EventHandler* event_handler, 91 ClientSession(EventHandler* event_handler,
89 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 92 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
90 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, 93 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
91 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, 94 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
92 scoped_ptr<protocol::ConnectionToClient> connection, 95 scoped_ptr<protocol::ConnectionToClient> connection,
93 scoped_ptr<DesktopEnvironment> desktop_environment, 96 DesktopEnvironmentFactory* desktop_environment_factory,
94 const base::TimeDelta& max_duration); 97 const base::TimeDelta& max_duration);
95 98
96 // protocol::HostStub interface. 99 // protocol::HostStub interface.
97 virtual void NotifyClientDimensions( 100 virtual void NotifyClientDimensions(
98 const protocol::ClientDimensions& dimensions) OVERRIDE; 101 const protocol::ClientDimensions& dimensions) OVERRIDE;
99 virtual void ControlVideo( 102 virtual void ControlVideo(
100 const protocol::VideoControl& video_control) OVERRIDE; 103 const protocol::VideoControl& video_control) OVERRIDE;
101 104
102 // protocol::ConnectionToClient::EventHandler interface. 105 // protocol::ConnectionToClient::EventHandler interface.
103 virtual void OnConnectionAuthenticated( 106 virtual void OnConnectionAuthenticated(
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 }; 234 };
232 235
233 // Destroys |ClienSession| instances on the network thread. 236 // Destroys |ClienSession| instances on the network thread.
234 struct ClientSessionTraits { 237 struct ClientSessionTraits {
235 static void Destruct(const ClientSession* client); 238 static void Destruct(const ClientSession* client);
236 }; 239 };
237 240
238 } // namespace remoting 241 } // namespace remoting
239 242
240 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 243 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698