chromium/content/browser/webauth/virtual_fido_discovery_factory.h

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

#ifndef CONTENT_BROWSER_WEBAUTH_VIRTUAL_FIDO_DISCOVERY_FACTORY_H_
#define CONTENT_BROWSER_WEBAUTH_VIRTUAL_FIDO_DISCOVERY_FACTORY_H_

#include <memory>
#include <set>
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
#include "content/browser/webauth/virtual_authenticator_manager_impl.h"
#include "device/fido/fido_discovery_factory.h"
#include "device/fido/virtual_fido_device.h"

namespace device {
class FidoDiscoveryBase;
}

namespace content {

class VirtualAuthenticator;
class VirtualFidoDiscovery;
class VirtualFidoDiscoveryFactory;

// VirtualFidoDiscoveryFactory is instantiated by
// VirtualAuthenticatorManagerImpl. It produces FidoDiscovery instances that
// instantiate a virtual device for each authenticator configured in
// VirtualAuthenticatorManagerImpl.
//
// Its lifetime is limited to the duration of a WebAuthn request. Note that this
// differs from VirtualAuthenticatorManagerImpl which is instantiated and
// destroyed in response to operations on the Virtual Authenticator API.
class VirtualFidoDiscoveryFactory
    : public device::FidoDiscoveryFactory,
      public VirtualAuthenticatorManagerImpl::Observer {};

}  // namespace content

#endif  // CONTENT_BROWSER_WEBAUTH_VIRTUAL_FIDO_DISCOVERY_FACTORY_H_