chromium/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.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_MDNS_CAST_MEDIA_SINK_SERVICE_IMPL_H_
#define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_MDNS_CAST_MEDIA_SINK_SERVICE_IMPL_H_

#include <memory>
#include <set>

#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.h"
#include "chrome/browser/media/router/discovery/discovery_network_monitor.h"
#include "chrome/browser/media/router/discovery/media_sink_discovery_metrics.h"
#include "components/media_router/common/discovery/media_sink_service_base.h"
#include "components/media_router/common/providers/cast/channel/cast_channel_enum.h"
#include "components/media_router/common/providers/cast/channel/cast_socket.h"
#include "net/base/backoff_entry.h"
#include "third_party/openscreen/src/cast/common/channel/proto/cast_channel.pb.h"

namespace cast_channel {
class CastSocketService;
}

namespace media_router {

// Discovers and manages Cast MediaSinks using CastSocketService. This class
// also observes DialMediaSinkServiceImpl for sinks to connect to (also known
// as dual discovery). It is indirectly owned by a singleton that is never
// freed. It may be created on any thread. All methods, unless otherwise
// noted, must be invoked on the SequencedTaskRunner given by |task_runner_|.
class CastMediaSinkServiceImpl : public MediaSinkServiceBase,
                                 public cast_channel::CastSocket::Observer,
                                 public DiscoveryNetworkMonitor::Observer,
                                 public MediaSinkServiceBase::Observer {};

}  // namespace media_router

#endif  // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_MDNS_CAST_MEDIA_SINK_SERVICE_IMPL_H_