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

Unified Diff: remoting/protocol/webrtc_connection_to_client.cc

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: Created 3 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 | « remoting/protocol/webrtc_connection_to_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « remoting/protocol/webrtc_connection_to_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698