#include "third_party/blink/renderer/platform/p2p/mdns_responder_adapter.h"
#include <string>
#include "components/webrtc/net_address_utils.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "services/network/public/mojom/mdns_responder.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/mojo/mojo_binding_context.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/webrtc/rtc_base/ip_address.h"
namespace blink {
namespace {
void OnNameCreatedForAddress(
webrtc::MdnsResponderInterface::NameCreatedCallback callback,
const rtc::IPAddress& addr,
const String& name,
bool announcement_scheduled) { … }
void OnNameRemovedForAddress(
webrtc::MdnsResponderInterface::NameRemovedCallback callback,
bool removed,
bool goodbye_scheduled) { … }
}
MdnsResponderAdapter::MdnsResponderAdapter(MojoBindingContext& context) { … }
MdnsResponderAdapter::~MdnsResponderAdapter() = default;
void MdnsResponderAdapter::CreateNameForAddress(const rtc::IPAddress& addr,
NameCreatedCallback callback) { … }
void MdnsResponderAdapter::RemoveNameForAddress(const rtc::IPAddress& addr,
NameRemovedCallback callback) { … }
}