Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(845)

Unified Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2936623002: Implement dumb URLLoader{Factory} for ServiceWorker script loading (for try)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/service_worker/service_worker_context_client.h
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 2d39dcba84dcfe06fb43a543539a51748aeea7b2..92c60717f68074225b301714f7907542cf9f4e9e 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -22,6 +22,7 @@
#include "content/child/webmessageportchannel_impl.h"
#include "content/common/service_worker/embedded_worker.mojom.h"
#include "content/common/service_worker/service_worker_event_dispatcher.mojom.h"
+#include "content/common/service_worker/service_worker_provider.mojom.h"
#include "content/common/service_worker/service_worker_status_code.h"
#include "content/common/service_worker/service_worker_types.h"
#include "ipc/ipc_listener.h"
@@ -57,8 +58,8 @@ namespace content {
struct PlatformNotificationData;
struct PushEventPayload;
struct ServiceWorkerClientInfo;
+class ServiceWorkerNetworkProvider;
class ServiceWorkerProviderContext;
-class ServiceWorkerContextClient;
class ThreadSafeSender;
class EmbeddedWorkerInstanceClientImpl;
class WebWorkerFetchContext;
@@ -87,6 +88,7 @@ class ServiceWorkerContextClient : public blink::WebServiceWorkerContextClient,
const GURL& script_url,
mojom::ServiceWorkerEventDispatcherRequest dispatcher_request,
mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host,
+ mojom::ServiceWorkerProviderClientInfoPtr provider_client_info,
std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client);
~ServiceWorkerContextClient() override;
@@ -342,7 +344,6 @@ class ServiceWorkerContextClient : public blink::WebServiceWorkerContextClient,
const int64_t service_worker_version_id_;
const GURL service_worker_scope_;
const GURL script_url_;
- int network_provider_id_ = kInvalidServiceWorkerProviderId;
scoped_refptr<ThreadSafeSender> sender_;
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
scoped_refptr<base::TaskRunner> worker_task_runner_;
@@ -359,6 +360,10 @@ class ServiceWorkerContextClient : public blink::WebServiceWorkerContextClient,
scoped_refptr<mojom::ThreadSafeEmbeddedWorkerInstanceHostAssociatedPtr>
instance_host_;
+ // This is passed to ServiceWorkerNetworkProvider when
+ // createServiceWorkerNetworkProvider is called.
+ std::unique_ptr<ServiceWorkerNetworkProvider> pending_network_provider_;
+
// Renderer-side object corresponding to WebEmbeddedWorkerInstance.
// This is valid from the ctor to workerContextDestroyed.
std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client_;

Powered by Google App Engine
This is Rietveld 408576698