#include "chrome/browser/ui/views/side_panel/extensions/extension_side_panel_manager.h"
#include "base/memory/scoped_refptr.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/actions/chrome_action_id.h"
#include "chrome/browser/ui/actions/chrome_actions.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_actions.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/side_panel/side_panel_action_callback.h"
#include "chrome/browser/ui/views/side_panel/side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/side_panel_registry.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/permissions_data.h"
#include "third_party/abseil-cpp/absl/memory/memory.h"
#include "ui/actions/actions.h"
#include "ui/base/ui_base_features.h"
namespace extensions {
namespace {
const char kExtensionSidePanelManagerKey[] = …;
}
ExtensionSidePanelManager::ExtensionSidePanelManager(
Profile* profile,
Browser* browser,
content::WebContents* web_contents,
SidePanelRegistry* registry)
: … { … }
ExtensionSidePanelManager::~ExtensionSidePanelManager() = default;
void ExtensionSidePanelManager::CreateForBrowser(
Browser* browser,
SidePanelRegistry* window_registry) { … }
ExtensionSidePanelManager* ExtensionSidePanelManager::GetForBrowserForTesting(
Browser* browser) { … }
void ExtensionSidePanelManager::CreateForTab(Profile* profile,
content::WebContents* web_contents,
SidePanelRegistry* tab_registry) { … }
ExtensionSidePanelManager* ExtensionSidePanelManager::GetForTabForTesting(
content::WebContents* web_contents) { … }
ExtensionSidePanelCoordinator*
ExtensionSidePanelManager::GetExtensionCoordinatorForTesting(
const ExtensionId& extension_id) { … }
void ExtensionSidePanelManager::RegisterExtensionEntries() { … }
void ExtensionSidePanelManager::InitializeActions() { … }
void ExtensionSidePanelManager::OnExtensionLoaded(
content::BrowserContext* browser_context,
const Extension* extension) { … }
void ExtensionSidePanelManager::MaybeCreateActionItemForExtension(
const Extension* extension) { … }
actions::ActionId ExtensionSidePanelManager::GetOrCreateActionIdForExtension(
const Extension* extension) { … }
void ExtensionSidePanelManager::MaybeRemoveActionItemForExtension(
const Extension* extension) { … }
void ExtensionSidePanelManager::OnExtensionUnloaded(
content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionReason reason) { … }
void ExtensionSidePanelManager::OnRegistryDestroying(
SidePanelRegistry* registry) { … }
void ExtensionSidePanelManager::WillDiscard() { … }
void ExtensionSidePanelManager::OnProfileWillBeDestroyed(Profile* profile) { … }
void ExtensionSidePanelManager::MaybeCreateExtensionSidePanelCoordinator(
const Extension* extension) { … }
}