#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 {
bool g_should_ignore_learn_more_for_testing = …;
std::set<Profile*>& GetShownProfileSet() { … }
std::set<Profile*>& GetPendingProfileSet() { … }
const extensions::Extension* GetExtensionToWarnAbout(Profile& profile) { … }
void AcknowledgeExtension(Profile& profile,
const extensions::ExtensionId& extension_id) { … }
}
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) { … }