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

Unified Diff: remoting/protocol/connection_to_client.h

Issue 2254673002: Remove dependency on AudioStub in ConnectionToClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: remoting/protocol/connection_to_client.h
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h
index 30216ba8006215b0d87d91f35414cd44e7a4b624..f31337dcd3696bfe7da8d5eb3c95ee7ad7c6a6c7 100644
--- a/remoting/protocol/connection_to_client.h
+++ b/remoting/protocol/connection_to_client.h
@@ -21,7 +21,8 @@ class VideoEncoder;
namespace protocol {
-class AudioStub;
+class AudioSendStream;
+class AudioSource;
class ClientStub;
class ClipboardStub;
class HostStub;
@@ -43,7 +44,7 @@ class ConnectionToClient {
// Called to request creation of video streams. May be called before or
// after OnConnectionChannelsConnected().
- virtual void CreateVideoStreams(ConnectionToClient* connection) = 0;
+ virtual void CreateMediaStreams(ConnectionToClient* connection) = 0;
// Called when the network connection is authenticated and all
// channels are connected.
@@ -91,11 +92,14 @@ class ConnectionToClient {
virtual std::unique_ptr<VideoStream> StartVideoStream(
std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) = 0;
- // Get the stubs used by the host to transmit messages to the client.
- // The stubs must not be accessed before OnConnectionAuthenticated(), or
+ // Starts an audio stream. Returns nullptr if audio is not supported by the
+ // client.
+ virtual std::unique_ptr<AudioSendStream> StartAudioStream(
+ std::unique_ptr<AudioSource> audio_source) = 0;
+
+ // The client stubs used by the host to send control messages to the client.
+ // The stub must not be accessed before OnConnectionAuthenticated(), or
// after OnConnectionClosed().
- // Note that the audio stub will be nullptr if audio is not enabled.
- virtual AudioStub* audio_stub() = 0;
virtual ClientStub* client_stub() = 0;
// Set the stubs which will handle messages we receive from the client. These

Powered by Google App Engine
This is Rietveld 408576698