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

Unified Diff: remoting/protocol/process_stats_adapter.h

Issue 2856243002: [Chromoting] Add ProcessStatsDispatcher to send process stats to the client
Patch Set: Change ProcessStatsDispatcher into ProcessStatsAgent and send the message through ClientStub 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
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..d81885618bf6ce2750732b1d9420cfcd7c587cc6
--- /dev/null
+++ b/remoting/protocol/process_stats_adapter.h
@@ -0,0 +1,33 @@
+// 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:
Sergey Ulanov 2017/05/26 19:27:30 nit: add empty line here
Hzj_jie 2017/05/26 20:42:16 Done.
+ ClientStub* const client_stub_;
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_

Powered by Google App Engine
This is Rietveld 408576698