#include "chrome/browser/ui/views/side_panel/extensions/extension_side_panel_coordinator.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/extension_view_host_factory.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_coordinator.h"
#include "chrome/browser/ui/views/side_panel/side_panel_registry.h"
#include "chrome/browser/ui/views/side_panel/side_panel_util.h"
#include "chrome/common/extensions/api/side_panel.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_icon_placeholder.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/permissions_data.h"
#include "ui/actions/actions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/layout.h"
#include "ui/base/ui_base_features.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/view.h"
namespace extensions {
namespace {
int GetCurrentTabId(Browser* browser) { … }
bool IsSidePanelEnabled(const api::side_panel::PanelOptions& options) { … }
bool HasGlobalSidePanel(content::BrowserContext* context,
const Extension& extension) { … }
}
ExtensionSidePanelCoordinator::ExtensionSidePanelCoordinator(
Profile* profile,
Browser* browser,
content::WebContents* web_contents,
const Extension* extension,
SidePanelRegistry* registry)
: … { … }
ExtensionSidePanelCoordinator::~ExtensionSidePanelCoordinator() = default;
content::WebContents*
ExtensionSidePanelCoordinator::GetHostWebContentsForTesting() const { … }
SidePanelEntry::Key ExtensionSidePanelCoordinator::GetEntryKey() const { … }
SidePanelEntry* ExtensionSidePanelCoordinator::GetEntry() const { … }
bool ExtensionSidePanelCoordinator::IsGlobalCoordinator() const { … }
bool ExtensionSidePanelCoordinator::IsDisabledForTab(int tab_id) const { … }
void ExtensionSidePanelCoordinator::DeregisterEntry() { … }
void ExtensionSidePanelCoordinator::DeregisterGlobalEntryAndCacheView() { … }
void ExtensionSidePanelCoordinator::OnPanelOptionsChanged(
const ExtensionId& extension_id,
const api::side_panel::PanelOptions& updated_options) { … }
void ExtensionSidePanelCoordinator::OnSidePanelServiceShutdown() { … }
void ExtensionSidePanelCoordinator::OnViewDestroying() { … }
void ExtensionSidePanelCoordinator::OnTabStripModelChanged(
TabStripModel* tab_strip_model,
const TabStripModelChange& change,
const TabStripSelectionChange& selection) { … }
void ExtensionSidePanelCoordinator::CreateAndRegisterEntry() { … }
std::unique_ptr<views::View> ExtensionSidePanelCoordinator::CreateView() { … }
void ExtensionSidePanelCoordinator::HandleCloseExtensionSidePanel(
ExtensionHost* host) { … }
void ExtensionSidePanelCoordinator::NavigateIfNecessary() { … }
void ExtensionSidePanelCoordinator::LoadExtensionIcon() { … }
void ExtensionSidePanelCoordinator::UpdateActionItemIcon() { … }
Browser* ExtensionSidePanelCoordinator::GetBrowser() { … }
}