chromium/chrome/browser/media/router/discovery/discovery_network_monitor.h

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

#ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_MONITOR_H_
#define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_MONITOR_H_

#include <string>
#include <vector>

#include "base/functional/bind.h"
#include "base/lazy_instance.h"
#include "base/observer_list_threadsafe.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "chrome/browser/media/router/discovery/discovery_network_info.h"
#include "net/base/ip_address.h"
#include "services/network/public/cpp/network_connection_tracker.h"

namespace media_router {

// Tracks the set of active network interfaces that can be used for local
// discovery.  If the list of interfaces changes, then
// DiscoveryNetworkMonitor::Observer is called with the instance of the monitor.
// Only one instance of this will be created per browser process.
//
// This class is not thread-safe, except for adding and removing observers.
// Most of the work done by the monitor is done on the IO thread, which includes
// updating the current network ID.  Therefore |GetNetworkId| should only be
// called from the IO thread.  All observers will be notified of network changes
// on the thread from which they registered.
class DiscoveryNetworkMonitor
    : public network::NetworkConnectionTracker::NetworkConnectionObserver {};

}  // namespace media_router

#endif  // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_MONITOR_H_