#include "chrome/browser/ui/views/certificate_selector.h"
#include <stddef.h>
#include <string>
#include <vector>
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/certificate_viewer.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/strings/grit/components_strings.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/table_model.h"
#include "ui/base/models/table_model_observer.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/table/table_view.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/widget/widget.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/certificate_provider/certificate_provider_service.h"
#include "chrome/browser/certificate_provider/certificate_provider_service_factory.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_factory.h"
#endif
namespace chrome {
const int CertificateSelector::kTableViewWidth = …;
const int CertificateSelector::kTableViewHeight = …;
class CertificateSelector::CertificateTableModel : public ui::TableModel { … };
CertificateSelector::CertificateTableModel::CertificateTableModel(
const net::ClientCertIdentityList& identities,
const std::vector<std::string>& provider_names) { … }
size_t CertificateSelector::CertificateTableModel::RowCount() { … }
std::u16string CertificateSelector::CertificateTableModel::GetText(
size_t index,
int column_id) { … }
void CertificateSelector::CertificateTableModel::SetObserver(
ui::TableModelObserver* observer) { … }
CertificateSelector::CertificateSelector(net::ClientCertIdentityList identities,
content::WebContents* web_contents)
: … { … }
CertificateSelector::~CertificateSelector() { … }
bool CertificateSelector::CanShow(content::WebContents* web_contents) { … }
void CertificateSelector::Show() { … }
void CertificateSelector::InitWithText(
std::unique_ptr<views::View> text_label) { … }
ui::TableModel* CertificateSelector::table_model_for_testing() const { … }
net::ClientCertIdentity* CertificateSelector::GetSelectedCert() const { … }
bool CertificateSelector::Accept() { … }
std::u16string CertificateSelector::GetWindowTitle() const { … }
bool CertificateSelector::IsDialogButtonEnabled(
ui::mojom::DialogButton button) const { … }
views::View* CertificateSelector::GetInitiallyFocusedView() { … }
void CertificateSelector::ViewCertButtonPressed() { … }
void CertificateSelector::OnSelectionChanged() { … }
void CertificateSelector::OnDoubleClick() { … }
BEGIN_METADATA(…)
}