Chromium Code Reviews| 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_ |