chromium/chrome/browser/ui/views/webid/account_selection_view_base.h

// Copyright 2022 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_UI_VIEWS_WEBID_ACCOUNT_SELECTION_VIEW_BASE_H_
#define CHROME_BROWSER_UI_VIEWS_WEBID_ACCOUNT_SELECTION_VIEW_BASE_H_

#include <optional>
#include <string>
#include <vector>

#include "base/functional/callback_helpers.h"
#include "base/i18n/case_conversion.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_observer.h"
#include "chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.h"
#include "chrome/browser/ui/monogram_utils.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/webid/account_selection_view.h"
#include "components/image_fetcher/core/image_fetcher.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/canvas_image_source.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/widget/widget_observer.h"

TokenError;

namespace content {
struct IdentityRequestAccount;
}  // namespace content

// The radius used for the corner of the "Continue as" button.
inline constexpr int kButtonRadius =;
// The fixed, total width of the bubble.
inline constexpr int kBubbleWidth =;
// The desired size of the avatars of user accounts.
inline constexpr int kDesiredAvatarSize =;
// The desired size of the IDP icon used as badge for the user account avatar
// when there are multiple IDPs.
inline constexpr int kLargeAvatarBadgeSize =;
// The size of the icon of the identity provider in the bubble.
inline constexpr int kBubbleIdpIconSize =;
// The desired size of the icon for a "login to IDP" secondary view.
inline constexpr int kIdpLoginIconSize =;
// The desired size of the icon for the "Choose an account" button or the "sign
// in to IDP" button in the multi IDP UI.
inline constexpr int kMultiIdpIconSize =;
// The left margin of a multi IDP icon button.
inline constexpr int kMultiIdpIconLeftMargin =;
// The right margin of a multi IDP icon button.
inline constexpr int kMultiIdpIconRightMargin =;
// The size of the padding used at the top and bottom of the bubble.
inline constexpr int kTopBottomPadding =;
// The size of the horizontal padding between the bubble content and the edge of
// the bubble, as well as the horizontal padding between icons and text.
inline constexpr int kLeftRightPadding =;
// The size of the vertical padding for most elements in the bubble.
inline constexpr int kVerticalSpacing =;
// Vertical spacing for buttons in multi IDP.
inline constexpr int kMultiIdpVerticalSpacing =;
// The height of the progress bar shown when showing "Verifying...".
inline constexpr int kProgressBarHeight =;
// The size of the space between the right boundary of the WebContents and the
// right boundary of the bubble.
inline constexpr int kRightMargin =;
// The size of the space between the top boundary of the WebContents and the top
// boundary of the bubble.
inline constexpr int kTopMargin =;
// The size of the icon of the identity provider in the modal.
inline constexpr int kModalIdpIconSize =;
// The size of the icons when they are combined i.e. IDP icon + arrow icon + RP
// icon is shown at the same time in the modal.
inline constexpr int kModalCombinedIconSize =;
// The size of avatars in the modal dialog.
inline constexpr int kModalAvatarSize =;
// The size of the horizontal padding for most elements in the modal.
inline constexpr int kModalHorizontalSpacing =;
// Size of the IDP icon offset when badging the IDP icon in the account button.
inline constexpr int kIdpBadgeOffset =;
// The size of the arrow icon.
inline constexpr int kArrowIconSize =;

inline constexpr char kImageFetcherUmaClient[] =;

class BrandIconImageView : public views::ImageView {};

// Base class for interacting with FedCM account selection dialog.
class AccountSelectionViewBase : public PictureInPictureOcclusionObserver {};

#endif  // CHROME_BROWSER_UI_VIEWS_WEBID_ACCOUNT_SELECTION_VIEW_BASE_H_