#include "extensions/browser/api/offscreen/offscreen_api.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_type.h"
#include "extensions/browser/api/offscreen/offscreen_document_manager.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/offscreen_document_host.h"
#include "extensions/common/api/offscreen.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handlers/incognito_info.h"
#include "extensions/common/switches.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace extensions {
namespace {
content::BrowserContext& GetBrowserContextToUse(
content::BrowserContext& calling_context,
const Extension& extension) { … }
OffscreenDocumentManager* GetManagerToUse(
content::BrowserContext& calling_context,
const Extension& extension) { … }
}
OffscreenCreateDocumentFunction::OffscreenCreateDocumentFunction() = default;
OffscreenCreateDocumentFunction::~OffscreenCreateDocumentFunction() = default;
ExtensionFunction::ResponseAction OffscreenCreateDocumentFunction::Run() { … }
void OffscreenCreateDocumentFunction::OnBrowserContextShutdown() { … }
void OffscreenCreateDocumentFunction::OnExtensionHostDestroyed(
ExtensionHost* host) { … }
void OffscreenCreateDocumentFunction::OnExtensionHostDidStopFirstLoad(
const ExtensionHost* host) { … }
void OffscreenCreateDocumentFunction::NotifyPageFailedToLoad() { … }
void OffscreenCreateDocumentFunction::SendResponseToExtension(
ResponseValue response_value) { … }
OffscreenCloseDocumentFunction::OffscreenCloseDocumentFunction() = default;
OffscreenCloseDocumentFunction::~OffscreenCloseDocumentFunction() = default;
ExtensionFunction::ResponseAction OffscreenCloseDocumentFunction::Run() { … }
void OffscreenCloseDocumentFunction::OnBrowserContextShutdown() { … }
void OffscreenCloseDocumentFunction::OnExtensionHostDestroyed(
ExtensionHost* host) { … }
void OffscreenCloseDocumentFunction::SendResponseToExtension(
ResponseValue response_value) { … }
OffscreenHasDocumentFunction::OffscreenHasDocumentFunction() = default;
OffscreenHasDocumentFunction::~OffscreenHasDocumentFunction() = default;
ExtensionFunction::ResponseAction OffscreenHasDocumentFunction::Run() { … }
}