| Index: remoting/protocol/webrtc_connection_to_client.cc
|
| diff --git a/remoting/protocol/webrtc_connection_to_client.cc b/remoting/protocol/webrtc_connection_to_client.cc
|
| index 60f02823a1acd68fa951e6a9366e9c5f30b5fcc5..0df5e79db98b6af1794ab32bd73ee76e468eecb9 100644
|
| --- a/remoting/protocol/webrtc_connection_to_client.cc
|
| +++ b/remoting/protocol/webrtc_connection_to_client.cc
|
| @@ -20,6 +20,8 @@
|
| #include "remoting/protocol/host_stub.h"
|
| #include "remoting/protocol/input_stub.h"
|
| #include "remoting/protocol/message_pipe.h"
|
| +#include "remoting/protocol/process_stats_dispatcher.h"
|
| +#include "remoting/protocol/process_stats_stub.h"
|
| #include "remoting/protocol/transport_context.h"
|
| #include "remoting/protocol/webrtc_audio_stream.h"
|
| #include "remoting/protocol/webrtc_transport.h"
|
| @@ -49,6 +51,7 @@ WebrtcConnectionToClient::WebrtcConnectionToClient(
|
| audio_task_runner_(audio_task_runner),
|
| control_dispatcher_(new HostControlDispatcher()),
|
| event_dispatcher_(new HostEventDispatcher()),
|
| + stats_dispatcher_(new ProcessStatsDispatcher()),
|
| weak_factory_(this) {
|
| session_->SetEventHandler(this);
|
| session_->SetTransport(transport_.get());
|
| @@ -104,6 +107,12 @@ ClientStub* WebrtcConnectionToClient::client_stub() {
|
| return control_dispatcher_.get();
|
| }
|
|
|
| +// Return pointer to ProcessStatsStub.
|
| +ProcessStatsStub* WebrtcConnectionToClient::stats_stub() {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + return stats_dispatcher_.get();
|
| +}
|
| +
|
| void WebrtcConnectionToClient::set_clipboard_stub(
|
| protocol::ClipboardStub* clipboard_stub) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| @@ -151,6 +160,7 @@ void WebrtcConnectionToClient::OnSessionStateChange(Session::State state) {
|
| case Session::FAILED:
|
| control_dispatcher_.reset();
|
| event_dispatcher_.reset();
|
| + stats_dispatcher_.reset();
|
| transport_->Close(state == Session::CLOSED ? OK : session_->error());
|
| transport_.reset();
|
| event_handler_->OnConnectionClosed(
|
|
|