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

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <string>

#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/bubble_anchor_util_views.h"
#include "chrome/browser/ui/views/device_chooser_content_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h"
#include "chrome/browser/ui/views/title_origin_label.h"
#include "components/permissions/chooser_controller.h"
#include "extensions/buildflags/buildflags.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/controls/table/table_view_observer.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/widget/widget.h"

#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/ui/extensions/extensions_dialogs.h"
#include "chrome/browser/ui/views/extensions/extensions_toolbar_container.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/toolbar_button_provider.h"
#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/extension.h"
#endif

AnchorConfiguration;

namespace {

AnchorConfiguration GetChooserAnchorConfiguration(Browser* browser) {}

gfx::Rect GetChooserAnchorRect(Browser* browser) {}

}  // namespace

///////////////////////////////////////////////////////////////////////////////
// View implementation for the chooser bubble.
class ChooserBubbleUiViewDelegate : public LocationBarBubbleDelegateView,
                                    public views::TableViewObserver {};

ChooserBubbleUiViewDelegate::ChooserBubbleUiViewDelegate(
    Browser* browser,
    content::WebContents* contents,
    std::unique_ptr<permissions::ChooserController> chooser_controller)
    :{}

ChooserBubbleUiViewDelegate::~ChooserBubbleUiViewDelegate() = default;

void ChooserBubbleUiViewDelegate::AddedToWidget() {}

std::u16string ChooserBubbleUiViewDelegate::GetWindowTitle() const {}

views::View* ChooserBubbleUiViewDelegate::GetInitiallyFocusedView() {}

bool ChooserBubbleUiViewDelegate::IsDialogButtonEnabled(
    ui::mojom::DialogButton button) const {}

void ChooserBubbleUiViewDelegate::OnSelectionChanged() {}

void ChooserBubbleUiViewDelegate::UpdateAnchor(Browser* browser) {}

void ChooserBubbleUiViewDelegate::UpdateTableView() const {}

base::OnceClosure ChooserBubbleUiViewDelegate::MakeCloseClosure() {}

void ChooserBubbleUiViewDelegate::Close() {}

BEGIN_METADATA()

namespace chrome {

namespace {

#if BUILDFLAG(ENABLE_EXTENSIONS)
base::OnceClosure ShowDeviceChooserDialogForExtension(
    content::RenderFrameHost* owner,
    const extensions::Extension* extension,
    std::unique_ptr<permissions::ChooserController> controller) {}
#endif  // BUILDFLAG(ENABLE_EXTENSIONS)

}  // namespace

base::OnceClosure ShowDeviceChooserDialog(
    content::RenderFrameHost* owner,
    std::unique_ptr<permissions::ChooserController> controller) {}

}  // namespace chrome