chromium/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.cc

// Copyright 2023 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/permissions/embedded_permission_prompt_base_view.h"

#include "base/functional/callback_helpers.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_widget_sublevel.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "components/permissions/features.h"
#include "components/vector_icons/vector_icons.h"
#include "third_party/blink/public/common/features_generated.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/l10n/l10n_util.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/ui_base_features.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/throbber.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"

DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(EmbeddedPermissionPromptBaseView,
                                      kMainViewId);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(EmbeddedPermissionPromptBaseView,
                                      kLabelViewId1);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(EmbeddedPermissionPromptBaseView,
                                      kLabelViewId2);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(EmbeddedPermissionPromptBaseView,
                                      kTitleViewId);

PermissionElementPromptPosition;

namespace {

constexpr int BODY_TOP_MARGIN =;
constexpr int DISTANCE_BUTTON_VERTICAL =;

void AddElementIdentifierToLabel(views::Label& label, size_t index) {}

std::unique_ptr<views::View> AddSpacer() {}

int GetPermissionIconSize() {}

}  // namespace

EmbeddedPermissionPromptBaseView::EmbeddedPermissionPromptBaseView(
    Browser* browser,
    base::WeakPtr<EmbeddedPermissionPromptViewDelegate> delegate)
    :{}

EmbeddedPermissionPromptBaseView::~EmbeddedPermissionPromptBaseView() = default;

void EmbeddedPermissionPromptBaseView::Show() {}

const gfx::VectorIcon& EmbeddedPermissionPromptBaseView::GetIcon() const {}

bool EmbeddedPermissionPromptBaseView::ShowLoadingIcon() const {}

void EmbeddedPermissionPromptBaseView::CreateWidget() {}

std::unique_ptr<views::FlexLayoutView>
EmbeddedPermissionPromptBaseView::CreateLoadingIcon() {}

void EmbeddedPermissionPromptBaseView::AddedToWidget() {}

void EmbeddedPermissionPromptBaseView::ClosingPermission() {}

void EmbeddedPermissionPromptBaseView::PrepareToClose() {}

PermissionElementPromptPosition
EmbeddedPermissionPromptBaseView::GetPromptPosition() const {}

void EmbeddedPermissionPromptBaseView::ShowWidget() {}

void EmbeddedPermissionPromptBaseView::UpdateAnchor(views::Widget* widget) {}

bool EmbeddedPermissionPromptBaseView::ShouldShowCloseButton() const {}

void EmbeddedPermissionPromptBaseView::Init() {}

void EmbeddedPermissionPromptBaseView::AddRequestLine(
    const RequestLineConfiguration& line,
    std::size_t index) {}

void EmbeddedPermissionPromptBaseView::AddButton(
    views::View& buttons_container,
    const ButtonConfiguration& button) {}

gfx::Rect EmbeddedPermissionPromptBaseView::GetBubbleBounds() {}

BEGIN_METADATA()