| Index: remoting/protocol/process_stats_dispatcher.cc
|
| diff --git a/remoting/protocol/process_stats_dispatcher.cc b/remoting/protocol/process_stats_dispatcher.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..31c0b1700ab9b5b8a6946950e011dc1cf80662fc
|
| --- /dev/null
|
| +++ b/remoting/protocol/process_stats_dispatcher.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#include "remoting/protocol/process_stats_dispatcher.h"
|
| +
|
| +#include "remoting/base/compound_buffer.h"
|
| +#include "remoting/base/constants.h"
|
| +#include "remoting/proto/process_stats.pb.h"
|
| +
|
| +namespace remoting {
|
| +namespace protocol {
|
| +
|
| +ProcessStatsDispatcher::ProcessStatsDispatcher()
|
| + : ChannelDispatcherBase(kProcessStatsChannelName) {}
|
| +
|
| +ProcessStatsDispatcher::~ProcessStatsDispatcher() = default;
|
| +
|
| +void ProcessStatsDispatcher::OnProcessStats(
|
| + const AggregatedProcessResourceUsage& usage) {
|
| + // MessagePipe::Send() receives a raw pointer without const-qualifier, so
|
| + // making a copy can avoid const_cast.
|
| + AggregatedProcessResourceUsage copy = usage;
|
| + message_pipe()->Send(©, base::Closure());
|
| +}
|
| +
|
| +void ProcessStatsDispatcher::OnIncomingMessage(
|
| + std::unique_ptr<remoting::CompoundBuffer> message) {
|
| + // Do not expect to receive message from this channel.
|
| +}
|
| +
|
| +} // namespace protocol
|
| +} // namespace remoting
|
|
|