blob: b6d37a7a3e01943a5b75c51dcf85d8e1c9bc1f28 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/webauthn/authenticator_transport_selector_sheet_view.h"
#include "chrome/browser/webauthn/authenticator_transport.h"
#include <utility>
AuthenticatorTransportSelectorSheetView::
AuthenticatorTransportSelectorSheetView(
std::unique_ptr<AuthenticatorTransportSelectorSheetModel> model)
: AuthenticatorRequestSheetView(std::move(model)) {}
AuthenticatorTransportSelectorSheetView::
~AuthenticatorTransportSelectorSheetView() = default;
std::unique_ptr<views::View>
AuthenticatorTransportSelectorSheetView::BuildStepSpecificContent() {
return std::make_unique<HoverListView>(
std::make_unique<TransportHoverListModel>(
model()->dialog_model()->available_transports(), this));
}
void AuthenticatorTransportSelectorSheetView::OnItemSelected(
AuthenticatorTransport transport) {
model()->OnTransportSelected(transport);
}