Commit b96a5653 authored by Lambros Lambrou's avatar Lambros Lambrou Committed by Commit Bot

[remoting host] Add RTC log to ConnectionToClient interface.

This CL makes the RTC log data available in ConnectionToClient. For
non-WebRTC client connections, nullptr is returned.

Bug: 1122798
Change-Id: Ib613f304c6ebe9ec7af4496487eca5c12c5f03d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436282Reviewed-by: default avatarJoe Downing <joedow@google.com>
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Auto-Submit: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811806}
parent 04baf73b
......@@ -30,6 +30,7 @@ class InputStub;
class PeerConnectionControls;
class Session;
class VideoStream;
class WebrtcEventLogData;
// This interface represents a remote viewer connection to the chromoting host.
// It sets up all protocol channels and connects them to the stubs.
......@@ -115,6 +116,10 @@ class ConnectionToClient {
// connection is established. nullptr will be returned if the connection does
// not support changing parameters on the fly.
virtual PeerConnectionControls* peer_connection_controls() = 0;
// Returns an object holding the RTC event logs if supported by this
// connection type, or nullptr otherwise.
virtual WebrtcEventLogData* rtc_event_log() = 0;
};
} // namespace protocol
......
......@@ -105,5 +105,9 @@ PeerConnectionControls* FakeConnectionToClient::peer_connection_controls() {
return nullptr;
}
WebrtcEventLogData* FakeConnectionToClient::rtc_event_log() {
return nullptr;
}
} // namespace protocol
} // namespace remoting
......@@ -68,6 +68,7 @@ class FakeConnectionToClient : public ConnectionToClient {
void set_input_stub(InputStub* input_stub) override;
PeerConnectionControls* peer_connection_controls() override;
WebrtcEventLogData* rtc_event_log() override;
base::WeakPtr<FakeVideoStream> last_video_stream() {
return last_video_stream_;
......
......@@ -147,6 +147,10 @@ PeerConnectionControls* IceConnectionToClient::peer_connection_controls() {
return nullptr;
}
WebrtcEventLogData* IceConnectionToClient::rtc_event_log() {
return nullptr;
}
void IceConnectionToClient::OnSessionStateChange(Session::State state) {
DCHECK(thread_checker_.CalledOnValidThread());
......
......@@ -56,6 +56,7 @@ class IceConnectionToClient : public ConnectionToClient,
void set_host_stub(HostStub* host_stub) override;
void set_input_stub(InputStub* input_stub) override;
PeerConnectionControls* peer_connection_controls() override;
WebrtcEventLogData* rtc_event_log() override;
private:
// Session::EventHandler interface.
......
......@@ -134,6 +134,10 @@ PeerConnectionControls* WebrtcConnectionToClient::peer_connection_controls() {
return transport_.get();
}
WebrtcEventLogData* WebrtcConnectionToClient::rtc_event_log() {
return transport_->rtc_event_log();
}
void WebrtcConnectionToClient::OnSessionStateChange(Session::State state) {
DCHECK(thread_checker_.CalledOnValidThread());
......
......@@ -52,6 +52,7 @@ class WebrtcConnectionToClient : public ConnectionToClient,
void set_input_stub(InputStub* input_stub) override;
void ApplySessionOptions(const SessionOptions& options) override;
PeerConnectionControls* peer_connection_controls() override;
WebrtcEventLogData* rtc_event_log() override;
// Session::EventHandler interface.
void OnSessionStateChange(Session::State state) override;
......
......@@ -87,6 +87,7 @@ class WebrtcTransport : public Transport,
return video_encoder_factory_;
}
WebrtcAudioModule* audio_module();
WebrtcEventLogData* rtc_event_log() { return &rtc_event_log_; }
// Creates outgoing data channel. The channel is created in CONNECTING state.
// The caller must wait for OnMessagePipeOpen() notification before sending
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment