chromium/chrome/browser/picture_in_picture/auto_pip_setting_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/picture_in_picture/auto_pip_setting_view.h"

#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
#include "components/url_formatter/url_formatter.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/gfx/text_elider.h"
#include "ui/views/layout/flex_layout_view.h"

// Represents the bubble top border offset, with respect to the
// Picture-in-Picture window title bar. Used to allow the Bubble to overlap the
// title bar.
constexpr int kBubbleTopOffset =;

// Used to set the control view buttons corner radius.
constexpr int kControlViewButtonCornerRadius =;

// Control view buttons width and height.
constexpr int kControlViewButtonWidth =;
constexpr int kControlViewButtonHeight =;

// Spacing between the BoxLayout children.
constexpr int kLayoutBetweenChildSpacing =;

// Control AutoPiP description view width and height.
constexpr int kDescriptionViewWidth =;
constexpr int kDescriptionViewHeight =;

// Bubble fixed width.
constexpr int kBubbleFixedWidth =;

// Bubble border corner radius.
constexpr int kBubbleBorderCornerRadius =;

// Bubble border MD shadow elevation.
constexpr int kBubbleBorderMdShadowElevation =;

// Bubble margins.
constexpr gfx::Insets kBubbleMargins =;

// Bubble title margins.
constexpr gfx::Insets kBubbleTitleMargins =;

// Maximum origin text width, for cases where the origin needs to be
// elided.
constexpr int kBubbleOriginTextMaximumWidth =;

// Control view margins. The bubble control view refers to the view containing
// the permission buttons.
constexpr gfx::Insets kControlViewMargins =;

AutoPipSettingView::AutoPipSettingView(
    ResultCb result_cb,
    HideViewCb hide_view_cb,
    const GURL& origin,
    const gfx::Rect& browser_view_overridden_bounds,
    views::View* anchor_view,
    views::BubbleBorder::Arrow arrow)
    :{}

AutoPipSettingView::~AutoPipSettingView() {}

void AutoPipSettingView::InitBubble() {}

raw_ptr<views::MdTextButton> AutoPipSettingView::InitControlViewButton(
    views::BoxLayoutView* controls_view,
    UiResult ui_result,
    const std::u16string& label_text) {}

void AutoPipSettingView::InitBubbleTitleView(const GURL& origin) {}

void AutoPipSettingView::OnButtonPressed(UiResult result) {}

bool AutoPipSettingView::WantsEvent(const gfx::Point& point_in_screen) {}

///////////////////////////////////////////////////////////////////////////////
// views::BubbleDialogDelegate:
gfx::Rect AutoPipSettingView::GetAnchorRect() const {}

///////////////////////////////////////////////////////////////////////////////
// views::WidgetDelegate:
std::unique_ptr<views::NonClientFrameView>
AutoPipSettingView::CreateNonClientFrameView(views::Widget* widget) {}

void AutoPipSettingView::OnWidgetInitialized() {}

///////////////////////////////////////////////////////////////////////////////
// AnchorViewObserver:
AutoPipSettingView::AnchorViewObserver::AnchorViewObserver(
    views::View* anchor_view,
    AutoPipSettingView* bubble)
    :{}
AutoPipSettingView::AnchorViewObserver::~AnchorViewObserver() = default;

void AutoPipSettingView::AnchorViewObserver::OnViewRemovedFromWidget(
    views::View*) {}
void AutoPipSettingView::AnchorViewObserver::OnViewIsDeleting(views::View*) {}

void AutoPipSettingView::AnchorViewObserver::CloseWidget() {}