chromium/chrome/browser/ui/views/search_engine_choice/search_engine_choice_dialog_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/search_engine_choice/search_engine_choice_dialog_view.h"

#include <algorithm>

#include "base/check_is_test.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service_factory.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/search_engine_choice/search_engine_choice_tab_helper.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/toolbar_button_provider.h"
#include "chrome/browser/ui/webui/search_engine_choice/search_engine_choice_ui.h"
#include "chrome/common/webui_url_constants.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/search_engines/search_engine_choice/search_engine_choice_utils.h"
#include "components/web_modal/web_contents_modal_dialog_host.h"
#include "content/public/browser/web_contents.h"
#include "third_party/blink/public/common/page/page_zoom.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/view_class_properties.h"

namespace {
// The minimum height and maximum dialog dimensions.
// We don't have a minimum width because operating systems have a minimum width
// for Chrome.
constexpr int kMinHeight =;
constexpr int kPreferredMaxDialogWidth =;
constexpr int kPreferredMaxDialogHeight =;

// This function is effectivley a copy of `DialogDelegate::GetCornerRadius()`.
int GetWebViewCornerRadius() {}

}  // namespace
void ShowSearchEngineChoiceDialog(
    Browser& browser,
    std::optional<gfx::Size> boundary_dimensions_for_test,
    std::optional<double> zoom_factor_for_test) {}

bool CanWindowHeightFitSearchEngineChoiceDialog(Browser& browser) {}

SearchEngineChoiceDialogView::SearchEngineChoiceDialogView(
    Browser* browser,
    std::optional<gfx::Size> boundary_dimensions_for_test,
    std::optional<double> zoom_factor_for_test)
    :{}

SearchEngineChoiceDialogView::~SearchEngineChoiceDialogView() = default;

void SearchEngineChoiceDialogView::Initialize() {}

void SearchEngineChoiceDialogView::ShowNativeView() {}

base::OnceClosure SearchEngineChoiceDialogView::GetCloseViewClosure() {}

void SearchEngineChoiceDialogView::CloseView() {}

BEGIN_METADATA()