chromium/chrome/browser/ui/views/passwords/move_to_account_store_bubble_view.cc

// Copyright 2020 The Chromium Authors
// 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/passwords/move_to_account_store_bubble_view.h"

#include <algorithm>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/ui/passwords/bubble_controllers/move_to_account_store_bubble_controller.h"
#include "chrome/browser/ui/passwords/passwords_model_delegate.h"
#include "chrome/browser/ui/passwords/ui_utils.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/image/canvas_image_source.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/text_constants.h"
#include "ui/gfx/vector_icon_types.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/style/typography.h"
#include "ui/views/view_class_properties.h"

namespace {

constexpr int kImageSize =;

// An image source that adds a circular border and an optional circular
// background to the given image.
class BackgroundBorderAdderImageSource : public gfx::CanvasImageSource {};

void BackgroundBorderAdderImageSource::Draw(gfx::Canvas* canvas) {}

// A class represting an image with a badge. By default, the image is the globe
// icon. However, badge could be updated via the UpdateBadge() method.
class ImageWithBadge : public views::ImageView {};

ImageWithBadge::ImageWithBadge(const gfx::ImageSkia& main_image)
    :{}

ImageWithBadge::ImageWithBadge(const gfx::VectorIcon& main_image)
    :{}

void ImageWithBadge::OnThemeChanged() {}

void ImageWithBadge::UpdateBadge(const gfx::ImageSkia& badge_image) {}

gfx::ImageSkia ImageWithBadge::GetMainImage() const {}

gfx::ImageSkia ImageWithBadge::GetBadge() const {}

void ImageWithBadge::Render() {}

BEGIN_METADATA()

std::unique_ptr<views::Label> CreateDescription(
    const std::u16string& profile_email) {}

}  // namespace

// A view that holds two badged images with an arrow between them to illustrate
// that a password is being moved from the device to the account.
class MoveToAccountStoreBubbleView::MovingBannerView : public views::View {};

MoveToAccountStoreBubbleView::MovingBannerView::MovingBannerView(
    std::unique_ptr<ImageWithBadge> from_image,
    std::unique_ptr<ImageWithBadge> to_image) {}

void MoveToAccountStoreBubbleView::MovingBannerView::UpdateFavicon(
    const gfx::ImageSkia& favicon) {}

BEGIN_METADATA()
END_METADATA

MoveToAccountStoreBubbleView::MoveToAccountStoreBubbleView(
    content::WebContents* web_contents,
    views::View* anchor_view)
    :{}

MoveToAccountStoreBubbleView::~MoveToAccountStoreBubbleView() = default;

void MoveToAccountStoreBubbleView::AddedToWidget() {}

MoveToAccountStoreBubbleController*
MoveToAccountStoreBubbleView::GetController() {}

const MoveToAccountStoreBubbleController*
MoveToAccountStoreBubbleView::GetController() const {}

ui::ImageModel MoveToAccountStoreBubbleView::GetWindowIcon() {}

void MoveToAccountStoreBubbleView::OnFaviconReady(const gfx::Image& favicon) {}

BEGIN_METADATA()