#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 {
constexpr int kMinHeight = …;
constexpr int kPreferredMaxDialogWidth = …;
constexpr int kPreferredMaxDialogHeight = …;
int GetWebViewCornerRadius() { … }
}
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(…)