chromium/components/net_log/net_log_proxy_source.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_NET_LOG_NET_LOG_PROXY_SOURCE_H_
#define COMPONENTS_NET_LOG_NET_LOG_PROXY_SOURCE_H_

#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/log/net_log.h"
#include "services/network/public/mojom/net_log.mojom.h"

namespace base {
class SequencedTaskRunner;
}

namespace net_log {

// Implementation of NetLogProxySource mojo interface which observes local
// NetLog events and proxies them over mojo to a remote NetLogProxySink.
// Observing and proxying is only active when notified through
// UpdateCaptureModes() that capturing is active in the remote process.
class NetLogProxySource : public net::NetLog::ThreadSafeObserver,
                          public network::mojom::NetLogProxySource {};

}  // namespace net_log

#endif  // COMPONENTS_NET_LOG_NET_LOG_PROXY_SOURCE_H_