#include "chrome/browser/extensions/extension_browser_window_helper.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_command_controller.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_enums.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/tab_utils.h"
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/unloaded_extension_reason.h"
#include "url/origin.h"
namespace extensions {
namespace {
bool ShouldCloseTabOnExtensionUnload(const Extension* extension,
Browser* browser,
content::WebContents* web_contents) { … }
void UnmuteIfMutedByExtension(content::WebContents* contents,
const ExtensionId& extension_id) { … }
}
ExtensionBrowserWindowHelper::ExtensionBrowserWindowHelper(Browser* browser)
: … { … }
ExtensionBrowserWindowHelper::~ExtensionBrowserWindowHelper() = default;
void ExtensionBrowserWindowHelper::OnExtensionLoaded(
content::BrowserContext* browser_context,
const Extension* extension) { … }
void ExtensionBrowserWindowHelper::OnExtensionUnloaded(
content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionReason reason) { … }
void ExtensionBrowserWindowHelper::CleanUpTabsOnUnload(
const Extension* extension) { … }
}