| 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_
|
|
|