chromium/chrome/browser/ui/views/web_apps/create_shortcut_confirmation_view.cc

// Copyright 2014 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/web_apps/create_shortcut_confirmation_view.h"

#include <memory>
#include <string>
#include <utility>

#include "base/feature_list.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/web_apps/web_app_info_image_source.h"
#include "chrome/browser/ui/views/web_apps/web_app_install_dialog_delegate.h"
#include "chrome/browser/ui/web_applications/web_app_dialogs.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
#include "chrome/browser/web_applications/web_app_constants.h"
#include "chrome/common/chrome_features.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/strings/grit/components_strings.h"
#include "components/webapps/browser/installable/ml_install_operation_tracker.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "third_party/blink/public/common/features.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.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/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/layout/table_layout.h"
#include "ui/views/widget/widget.h"

#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/constants/chromeos_features.h"
#endif

namespace {

CreateShortcutConfirmationView* g_dialog_for_testing =;
bool g_auto_accept_web_app_for_testing =;
bool g_auto_check_open_in_window_for_testing =;
const char* g_title_to_use_for_app =;

bool ShowRadioButtons() {}

}  // namespace

// static
CreateShortcutConfirmationView*
CreateShortcutConfirmationView::GetDialogForTesting() {}

CreateShortcutConfirmationView::~CreateShortcutConfirmationView() = default;

CreateShortcutConfirmationView::CreateShortcutConfirmationView(
    std::unique_ptr<web_app::WebAppInstallInfo> web_app_info,
    std::unique_ptr<webapps::MlInstallOperationTracker> install_tracker,
    web_app::AppInstallationAcceptanceCallback callback)
    :{}

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

bool CreateShortcutConfirmationView::ShouldShowCloseButton() const {}

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

void CreateShortcutConfirmationView::ContentsChanged(
    views::Textfield* sender,
    const std::u16string& new_contents) {}

std::u16string CreateShortcutConfirmationView::GetTrimmedTitle() const {}

void CreateShortcutConfirmationView::OnAccept() {}

void CreateShortcutConfirmationView::OnClose() {}

void CreateShortcutConfirmationView::OnCancel() {}

void CreateShortcutConfirmationView::RunCloseCallbackIfExists() {}

BEGIN_METADATA()

namespace web_app {

void ShowCreateShortcutDialog(
    content::WebContents* web_contents,
    std::unique_ptr<web_app::WebAppInstallInfo> web_app_info,
    std::unique_ptr<webapps::MlInstallOperationTracker> install_tracker,
    AppInstallationAcceptanceCallback callback) {}

void SetAutoAcceptWebAppDialogForTesting(bool auto_accept,  // IN-TEST
                                         bool auto_open_in_window) {}

void SetOverrideTitleForTesting(const char* title_to_use) {}

}  // namespace web_app