#include "content/browser/worker_host/dedicated_worker_host_factory_impl.h"
#include <memory>
#include <utility>
#include "base/feature_list.h"
#include "content/browser/devtools/devtools_throttle_handle.h"
#include "content/browser/devtools/worker_devtools_manager.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/storage_partition_impl.h"
#include "content/browser/worker_host/dedicated_worker_host.h"
#include "content/browser/worker_host/dedicated_worker_service_impl.h"
#include "content/public/browser/render_process_host.h"
#include "mojo/public/cpp/bindings/message.h"
#include "net/storage_access_api/status.h"
#include "services/network/public/mojom/client_security_state.mojom.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace content {
namespace {
DedicatedWorkerServiceImpl* GetDedicatedWorkerServiceImplForRenderProcessHost(
RenderProcessHost* worker_process_host) { … }
}
DedicatedWorkerHostFactoryImpl::DedicatedWorkerHostFactoryImpl(
int worker_process_id,
DedicatedWorkerCreator creator,
GlobalRenderFrameHostId ancestor_render_frame_host_id,
const blink::StorageKey& creator_storage_key,
const net::IsolationInfo& isolation_info,
network::mojom::ClientSecurityStatePtr creator_client_security_state,
base::WeakPtr<CrossOriginEmbedderPolicyReporter> creator_coep_reporter,
base::WeakPtr<CrossOriginEmbedderPolicyReporter> ancestor_coep_reporter)
: … { … }
DedicatedWorkerHostFactoryImpl::~DedicatedWorkerHostFactoryImpl() = default;
void DedicatedWorkerHostFactoryImpl::CreateWorkerHost(
const blink::DedicatedWorkerToken& token,
const GURL& script_url,
const url::Origin& renderer_origin,
mojo::PendingReceiver<blink::mojom::BrowserInterfaceBroker> broker_receiver,
mojo::PendingReceiver<blink::mojom::DedicatedWorkerHost> host_receiver,
CreateWorkerHostCallback callback) { … }
void DedicatedWorkerHostFactoryImpl::CreateWorkerHostAndStartScriptLoad(
const blink::DedicatedWorkerToken& token,
const GURL& script_url,
network::mojom::CredentialsMode credentials_mode,
blink::mojom::FetchClientSettingsObjectPtr
outside_fetch_client_settings_object,
mojo::PendingRemote<blink::mojom::BlobURLToken> blob_url_token,
mojo::PendingRemote<blink::mojom::DedicatedWorkerHostFactoryClient> client,
net::StorageAccessApiStatus storage_access_api_status) { … }
}