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

Unified Diff: remoting/host/client_session.h

Issue 1852033002: Fix WebRTC transport to use single offer-answer exchange instead of two. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_cast
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index a42e91e4edcc3741d30a1086852aae362865b612..8bc2e0944ccd97309fcd717833bba04491634003 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -44,13 +44,16 @@ class InputInjector;
class MouseShapePump;
class ScreenControls;
+namespace protocol {
+class VideoLayout;
+} // namespace protocol
+
// A ClientSession keeps a reference to a connection to a client, and maintains
// per-client state.
-class ClientSession
- : public base::NonThreadSafe,
- public protocol::HostStub,
- public protocol::ConnectionToClient::EventHandler,
- public ClientSessionControl {
+class ClientSession : public base::NonThreadSafe,
+ public protocol::HostStub,
+ public protocol::ConnectionToClient::EventHandler,
+ public ClientSessionControl {
public:
// Callback interface for passing events to the ChromotingHost.
class EventHandler {
@@ -112,6 +115,7 @@ class ClientSession
protocol::ConnectionToClient* connection) override;
void OnConnectionAuthenticated(
protocol::ConnectionToClient* connection) override;
+ void CreateVideoStreams(protocol::ConnectionToClient* connection) override;
void OnConnectionChannelsConnected(
protocol::ConnectionToClient* connection) override;
void OnConnectionClosed(protocol::ConnectionToClient* connection,
@@ -219,12 +223,19 @@ class ClientSession
std::unique_ptr<HostExtensionSessionManager> extension_manager_;
// Set to true if the client was authenticated successfully.
- bool is_authenticated_;
+ bool is_authenticated_ = false;
+
+ // Set to true after all data channels have been connected.
+ bool channels_connected_ = false;
// Used to store video channel pause & lossless parameters.
- bool pause_video_;
- bool lossless_video_encode_;
- bool lossless_video_color_;
+ bool pause_video_ = false;
+ bool lossless_video_encode_ = false;
+ bool lossless_video_color_ = false;
+
+ // VideoLayout is sent only after the control channel is connected. Until
+ // then it's stored in |pending_video_layout_message_|.
+ std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_;
// Used to disable callbacks to |this| once DisconnectSession() has been
// called.
« 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