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

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

Issue 12545026: ResizingHostObserver is created by the desktop environment together with other stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 20 matching lines...) Expand all
31 } // namespace base 31 } // namespace base
32 32
33 namespace remoting { 33 namespace remoting {
34 34
35 class AudioEncoder; 35 class AudioEncoder;
36 class AudioScheduler; 36 class AudioScheduler;
37 struct ClientSessionTraits; 37 struct ClientSessionTraits;
38 class DesktopEnvironment; 38 class DesktopEnvironment;
39 class DesktopEnvironmentFactory; 39 class DesktopEnvironmentFactory;
40 class EventExecutor; 40 class EventExecutor;
41 class SessionController;
41 class VideoEncoder; 42 class VideoEncoder;
42 class VideoScheduler; 43 class VideoScheduler;
43 44
44 // A ClientSession keeps a reference to a connection to a client, and maintains 45 // A ClientSession keeps a reference to a connection to a client, and maintains
45 // per-client state. 46 // per-client state.
46 class ClientSession 47 class ClientSession
47 : public base::RefCountedThreadSafe<ClientSession, ClientSessionTraits>, 48 : public base::RefCountedThreadSafe<ClientSession, ClientSessionTraits>,
48 public protocol::HostStub, 49 public protocol::HostStub,
49 public protocol::ConnectionToClient::EventHandler, 50 public protocol::ConnectionToClient::EventHandler,
50 public base::NonThreadSafe { 51 public base::NonThreadSafe {
(...skipping 20 matching lines...) Expand all
71 virtual void OnSessionSequenceNumber(ClientSession* client, 72 virtual void OnSessionSequenceNumber(ClientSession* client,
72 int64 sequence_number) = 0; 73 int64 sequence_number) = 0;
73 74
74 // Called on notification of a route change event, when a channel is 75 // Called on notification of a route change event, when a channel is
75 // connected. 76 // connected.
76 virtual void OnSessionRouteChange( 77 virtual void OnSessionRouteChange(
77 ClientSession* client, 78 ClientSession* client,
78 const std::string& channel_name, 79 const std::string& channel_name,
79 const protocol::TransportRoute& route) = 0; 80 const protocol::TransportRoute& route) = 0;
80 81
81 // Called when the initial client resolution is received, and when it
82 // changes.
83 virtual void OnClientResolutionChanged(ClientSession* client,
84 const SkISize& size,
85 const SkIPoint& dpi) = 0;
86
87 protected: 82 protected:
88 virtual ~EventHandler() {} 83 virtual ~EventHandler() {}
89 }; 84 };
90 85
91 // |event_handler| must outlive |this|. |desktop_environment_factory| is only 86 // |event_handler| must outlive |this|. |desktop_environment_factory| is only
92 // used by the constructor to create an instance of DesktopEnvironment. 87 // used by the constructor to create an instance of DesktopEnvironment.
93 ClientSession( 88 ClientSession(
94 EventHandler* event_handler, 89 EventHandler* event_handler,
95 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 90 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
96 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 91 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; 218 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
224 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 219 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
225 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 220 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
226 221
227 // Schedulers for audio and video capture. 222 // Schedulers for audio and video capture.
228 scoped_refptr<AudioScheduler> audio_scheduler_; 223 scoped_refptr<AudioScheduler> audio_scheduler_;
229 scoped_refptr<VideoScheduler> video_scheduler_; 224 scoped_refptr<VideoScheduler> video_scheduler_;
230 225
231 scoped_ptr<EventExecutor> event_executor_; 226 scoped_ptr<EventExecutor> event_executor_;
232 227
228 scoped_ptr<SessionController> session_controller_;
229
233 DISALLOW_COPY_AND_ASSIGN(ClientSession); 230 DISALLOW_COPY_AND_ASSIGN(ClientSession);
234 }; 231 };
235 232
236 // Destroys |ClienSession| instances on the network thread. 233 // Destroys |ClienSession| instances on the network thread.
237 struct ClientSessionTraits { 234 struct ClientSessionTraits {
238 static void Destruct(const ClientSession* client); 235 static void Destruct(const ClientSession* client);
239 }; 236 };
240 237
241 } // namespace remoting 238 } // namespace remoting
242 239
243 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 240 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698