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

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

Issue 2083843002: Replace VideoStream::SizeCallback with VideoStream::Observer interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge-sched-stream
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 11 matching lines...) Expand all
22 #include "remoting/protocol/clipboard_echo_filter.h" 22 #include "remoting/protocol/clipboard_echo_filter.h"
23 #include "remoting/protocol/clipboard_filter.h" 23 #include "remoting/protocol/clipboard_filter.h"
24 #include "remoting/protocol/clipboard_stub.h" 24 #include "remoting/protocol/clipboard_stub.h"
25 #include "remoting/protocol/connection_to_client.h" 25 #include "remoting/protocol/connection_to_client.h"
26 #include "remoting/protocol/host_stub.h" 26 #include "remoting/protocol/host_stub.h"
27 #include "remoting/protocol/input_event_tracker.h" 27 #include "remoting/protocol/input_event_tracker.h"
28 #include "remoting/protocol/input_filter.h" 28 #include "remoting/protocol/input_filter.h"
29 #include "remoting/protocol/input_stub.h" 29 #include "remoting/protocol/input_stub.h"
30 #include "remoting/protocol/mouse_input_filter.h" 30 #include "remoting/protocol/mouse_input_filter.h"
31 #include "remoting/protocol/pairing_registry.h" 31 #include "remoting/protocol/pairing_registry.h"
32 #include "remoting/protocol/video_stream.h"
32 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 33 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
33 34
34 namespace base { 35 namespace base {
35 class SingleThreadTaskRunner; 36 class SingleThreadTaskRunner;
36 } // namespace base 37 } // namespace base
37 38
38 namespace remoting { 39 namespace remoting {
39 40
40 class AudioPump; 41 class AudioPump;
41 class DesktopEnvironment; 42 class DesktopEnvironment;
42 class DesktopEnvironmentFactory; 43 class DesktopEnvironmentFactory;
43 class InputInjector; 44 class InputInjector;
44 class MouseShapePump; 45 class MouseShapePump;
45 class ScreenControls; 46 class ScreenControls;
46 47
47 namespace protocol { 48 namespace protocol {
48 class VideoLayout; 49 class VideoLayout;
49 } // namespace protocol 50 } // namespace protocol
50 51
51 // A ClientSession keeps a reference to a connection to a client, and maintains 52 // A ClientSession keeps a reference to a connection to a client, and maintains
52 // per-client state. 53 // per-client state.
53 class ClientSession : public base::NonThreadSafe, 54 class ClientSession : public base::NonThreadSafe,
54 public protocol::HostStub, 55 public protocol::HostStub,
55 public protocol::ConnectionToClient::EventHandler, 56 public protocol::ConnectionToClient::EventHandler,
57 public protocol::VideoStream::Observer,
56 public ClientSessionControl { 58 public ClientSessionControl {
57 public: 59 public:
58 // Callback interface for passing events to the ChromotingHost. 60 // Callback interface for passing events to the ChromotingHost.
59 class EventHandler { 61 class EventHandler {
60 public: 62 public:
61 // Called after authentication has started. 63 // Called after authentication has started.
62 virtual void OnSessionAuthenticating(ClientSession* client) = 0; 64 virtual void OnSessionAuthenticating(ClientSession* client) = 0;
63 65
64 // Called after authentication has finished successfully. 66 // Called after authentication has finished successfully.
65 virtual void OnSessionAuthenticated(ClientSession* client) = 0; 67 virtual void OnSessionAuthenticated(ClientSession* client) = 0;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool is_authenticated() { return is_authenticated_; } 139 bool is_authenticated() { return is_authenticated_; }
138 140
139 const std::string* client_capabilities() const { 141 const std::string* client_capabilities() const {
140 return client_capabilities_.get(); 142 return client_capabilities_.get();
141 } 143 }
142 144
143 private: 145 private:
144 // Creates a proxy for sending clipboard events to the client. 146 // Creates a proxy for sending clipboard events to the client.
145 std::unique_ptr<protocol::ClipboardStub> CreateClipboardProxy(); 147 std::unique_ptr<protocol::ClipboardStub> CreateClipboardProxy();
146 148
147 void OnScreenSizeChanged(const webrtc::DesktopSize& size, 149 // protocol::VideoStream::Observer implementation.
148 const webrtc::DesktopVector& dpi); 150 void OnVideoSizeChanged(protocol::VideoStream* stream,
151 const webrtc::DesktopSize& size,
152 const webrtc::DesktopVector& dpi) override;
153 void OnVideoFrameSent(protocol::VideoStream* stream,
154 uint32_t frame_id,
155 int64_t input_event_timestamp) override;
149 156
150 EventHandler* event_handler_; 157 EventHandler* event_handler_;
151 158
152 // The connection to the client. 159 // The connection to the client.
153 std::unique_ptr<protocol::ConnectionToClient> connection_; 160 std::unique_ptr<protocol::ConnectionToClient> connection_;
154 161
155 std::string client_jid_; 162 std::string client_jid_;
156 163
157 // Used to create a DesktopEnvironment instance for this session. 164 // Used to create a DesktopEnvironment instance for this session.
158 DesktopEnvironmentFactory* desktop_environment_factory_; 165 DesktopEnvironmentFactory* desktop_environment_factory_;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Used to disable callbacks to |this| once DisconnectSession() has been 247 // Used to disable callbacks to |this| once DisconnectSession() has been
241 // called. 248 // called.
242 base::WeakPtrFactory<ClientSessionControl> weak_factory_; 249 base::WeakPtrFactory<ClientSessionControl> weak_factory_;
243 250
244 DISALLOW_COPY_AND_ASSIGN(ClientSession); 251 DISALLOW_COPY_AND_ASSIGN(ClientSession);
245 }; 252 };
246 253
247 } // namespace remoting 254 } // namespace remoting
248 255
249 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 256 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698