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

Unified Diff: remoting/protocol/process_stats_adapter.h

Issue 2856243002: [Chromoting] Add ProcessStatsDispatcher to send process stats to the client
Patch Set: Partially resolve the review comments Created 3 years, 7 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/BUILD.gn ('k') | remoting/protocol/process_stats_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/process_stats_adapter.h
diff --git a/remoting/protocol/process_stats_adapter.h b/remoting/protocol/process_stats_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..fdcb39790740581c19c63a5605eef6424f232552
--- /dev/null
+++ b/remoting/protocol/process_stats_adapter.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_
+#define REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_
+
+#include "remoting/protocol/process_stats_stub.h"
+
+namespace remoting {
+namespace protocol {
+
+class AggregatedProcessResourceUsage;
+class ClientStub;
+
+// ProcessStatsAdapter implements ProcessStatsStub and sends data through
+// ClientStub.
+class ProcessStatsAdapter : public ProcessStatsStub {
+ public:
+ // Users should ensure |client_stub| outlives this instance.
+ explicit ProcessStatsAdapter(ClientStub* client_stub);
+ ~ProcessStatsAdapter() override;
+
+ // ProcessStatsStub implementation.
+ void OnProcessStats(const AggregatedProcessResourceUsage& usage) override;
+
+ private:
+ ClientStub* const client_stub_;
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_
« no previous file with comments | « remoting/protocol/BUILD.gn ('k') | remoting/protocol/process_stats_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698