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

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

Issue 2804843005: Implement the infrastructure of creating WorkerFetchContext in worker global scope. (Closed)
Patch Set: Created 3 years, 8 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/worker_fetch_context_info_impl.h
diff --git a/content/renderer/service_worker/worker_fetch_context_info_impl.h b/content/renderer/service_worker/worker_fetch_context_info_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..a01c095adb5a2886f71be84da0bca34cfcd8c7ba
--- /dev/null
+++ b/content/renderer/service_worker/worker_fetch_context_info_impl.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_SERVICE_WORKER_WORKER_FETCH_CONTEXT_INFO_IMPL_H_
+#define CONTENT_RENDERER_SERVICE_WORKER_WORKER_FETCH_CONTEXT_INFO_IMPL_H_
+
+#include "content/common/worker_fetch_context_factory.mojom.h"
+#include "third_party/WebKit/public/platform/WebWorkerFetchContextInfo.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace blink {
+class WebWorkerFetchContext;
+} // namespace blink
+
+namespace content {
+
+class WorkerFetchContextInfoImpl : public blink::WebWorkerFetchContextInfo {
+ public:
+ explicit WorkerFetchContextInfoImpl(
+ mojom::WorkerFetchContextFactoryPtrInfo factory_info);
+ ~WorkerFetchContextInfoImpl() override;
+
+ std::unique_ptr<blink::WebWorkerFetchContext> CreateContext(
+ base::SingleThreadTaskRunner* loading_task_runner) override;
+
+ private:
+ mojom::WorkerFetchContextFactoryPtrInfo factory_info_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_SERVICE_WORKER_WORKER_FETCH_CONTEXT_INFO_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698