#include "chrome/browser/ui/extensions/extension_enable_flow.h"
#include <memory>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/supervised_user/supervised_user_browser_utils.h"
#include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
#include "extensions/browser/api/management/management_api.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
#if !BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ui/profiles/profile_picker.h"
#endif
Extension;
ExtensionEnableFlow::ExtensionEnableFlow(Profile* profile,
const std::string& extension_id,
ExtensionEnableFlowDelegate* delegate)
: … { … }
ExtensionEnableFlow::~ExtensionEnableFlow() = default;
void ExtensionEnableFlow::StartForWebContents(
content::WebContents* parent_contents) { … }
void ExtensionEnableFlow::StartForNativeWindow(
gfx::NativeWindow parent_window) { … }
void ExtensionEnableFlow::Start() { … }
void ExtensionEnableFlow::Run() { … }
void ExtensionEnableFlow::CheckPermissionAndMaybePromptUser() { … }
void ExtensionEnableFlow::CreatePrompt() { … }
void ExtensionEnableFlow::OnExtensionApprovalDone(
extensions::SupervisedUserExtensionsDelegate::ExtensionApprovalResult
result) { … }
void ExtensionEnableFlow::StartObserving() { … }
void ExtensionEnableFlow::StopObserving() { … }
void ExtensionEnableFlow::OnLoadFailure(
content::BrowserContext* browser_context,
const base::FilePath& file_path,
const std::string& error) { … }
void ExtensionEnableFlow::OnExtensionLoaded(
content::BrowserContext* browser_context,
const Extension* extension) { … }
void ExtensionEnableFlow::OnExtensionUninstalled(
content::BrowserContext* browser_context,
const Extension* extension,
extensions::UninstallReason reason) { … }
void ExtensionEnableFlow::EnableExtension() { … }
void ExtensionEnableFlow::InstallPromptDone(
ExtensionInstallPrompt::DoneCallbackPayload payload) { … }