OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_ |
| 6 #define REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_ |
| 7 |
| 8 #include "remoting/protocol/process_stats_stub.h" |
| 9 |
| 10 namespace remoting { |
| 11 namespace protocol { |
| 12 |
| 13 class AggregatedProcessResourceUsage; |
| 14 class ClientStub; |
| 15 |
| 16 // ProcessStatsAdapter implements ProcessStatsStub and sends data through |
| 17 // ClientStub. |
| 18 class ProcessStatsAdapter : public ProcessStatsStub { |
| 19 public: |
| 20 // Users should ensure |client_stub| outlives this instance. |
| 21 explicit ProcessStatsAdapter(ClientStub* client_stub); |
| 22 ~ProcessStatsAdapter() override; |
| 23 |
| 24 // ProcessStatsStub implementation. |
| 25 void OnProcessStats(const AggregatedProcessResourceUsage& usage) override; |
| 26 |
| 27 private: |
| 28 ClientStub* const client_stub_; |
| 29 }; |
| 30 |
| 31 } // namespace protocol |
| 32 } // namespace remoting |
| 33 |
| 34 #endif // REMOTING_PROTOCOL_PROCESS_STATS_ADAPTER_H_ |
OLD | NEW |