chromium/chrome/browser/ui/extensions/controlled_home_bubble_delegate.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/extensions/controlled_home_bubble_delegate.h"

#include <utility>

#include "base/no_destructor.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/settings_api_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/common/referrer.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/manifest.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/window_open_disposition.h"

namespace {

// Whether we should ignore learn more clicks.
bool g_should_ignore_learn_more_for_testing =;

// The set of profiles for which a controlled home bubble has been shown (we
// only show once per profile per session).
std::set<Profile*>& GetShownProfileSet() {}

// The set of profiles for which a bubble is pending (but hasn't yet shown).
std::set<Profile*>& GetPendingProfileSet() {}

// Gets the extension that currently controls the home page and has not yet
// been acknowledged, if any.
const extensions::Extension* GetExtensionToWarnAbout(Profile& profile) {}

// Acknowledges the extension with the given `extension_id` so that we don't
// prompt the user about it again in the future.
void AcknowledgeExtension(Profile& profile,
                          const extensions::ExtensionId& extension_id) {}

}  // namespace

ControlledHomeBubbleDelegate::ControlledHomeBubbleDelegate(Browser* browser)
    :{}

ControlledHomeBubbleDelegate::~ControlledHomeBubbleDelegate() {}

base::AutoReset<bool>
ControlledHomeBubbleDelegate::IgnoreLearnMoreForTesting() {}

void ControlledHomeBubbleDelegate::ClearProfileSetForTesting() {}

bool ControlledHomeBubbleDelegate::ShouldShow() {}

void ControlledHomeBubbleDelegate::PendingShow() {}

std::u16string ControlledHomeBubbleDelegate::GetHeadingText() {}

std::u16string ControlledHomeBubbleDelegate::GetBodyText(
    bool anchored_to_action) {}

std::u16string ControlledHomeBubbleDelegate::GetActionButtonText() {}

std::u16string ControlledHomeBubbleDelegate::GetDismissButtonText() {}

ui::mojom::DialogButton ControlledHomeBubbleDelegate::GetDefaultDialogButton() {}

std::string ControlledHomeBubbleDelegate::GetAnchorActionId() {}

void ControlledHomeBubbleDelegate::OnBubbleShown(
    base::OnceClosure close_bubble_callback) {}

void ControlledHomeBubbleDelegate::OnBubbleClosed(CloseAction action) {}

std::unique_ptr<ToolbarActionsBarBubbleDelegate::ExtraViewInfo>
ControlledHomeBubbleDelegate::GetExtraViewInfo() {}

bool ControlledHomeBubbleDelegate::IsPolicyIndicationNeeded() const {}

void ControlledHomeBubbleDelegate::OnExtensionUnloaded(
    content::BrowserContext* browser_context,
    const extensions::Extension* extension,
    extensions::UnloadedExtensionReason reason) {}

void ControlledHomeBubbleDelegate::OnExtensionUninstalled(
    content::BrowserContext* browser_context,
    const extensions::Extension* extension,
    extensions::UninstallReason reason) {}

void ControlledHomeBubbleDelegate::HandleExtensionUnloadOrUninstall(
    const extensions::Extension* extension) {}

void ControlledHomeBubbleDelegate::OnShutdown(
    extensions::ExtensionRegistry* registry) {}