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

Unified Diff: third_party/WebKit/Source/modules/worklet/WorkletScriptLoader.h

Issue 2262483003: Worklet: Move common worklet code from modules/worklet to core/workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove modules/worklet directory Created 4 years, 4 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: third_party/WebKit/Source/modules/worklet/WorkletScriptLoader.h
diff --git a/third_party/WebKit/Source/modules/worklet/WorkletScriptLoader.h b/third_party/WebKit/Source/modules/worklet/WorkletScriptLoader.h
deleted file mode 100644
index 3ce3bd3a73ed6a3df8c243cd3fb40cda927516f0..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/worklet/WorkletScriptLoader.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2016 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 WorkletScriptLoader_h
-#define WorkletScriptLoader_h
-
-#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourceOwner.h"
-#include "core/fetch/ScriptResource.h"
-
-namespace blink {
-
-class Worklet;
-
-// Class that is responsible for processing {@code resource} that is associated with worklet's import promise.
-class WorkletScriptLoader final : public GarbageCollectedFinalized<WorkletScriptLoader>, public ResourceOwner<ScriptResource, ScriptResourceClient> {
- USING_GARBAGE_COLLECTED_MIXIN(WorkletScriptLoader);
- WTF_MAKE_NONCOPYABLE(WorkletScriptLoader);
-public:
- static WorkletScriptLoader* create(ScriptPromiseResolver* scriptPromiseResolver, Worklet* worklet, ScriptResource* resource)
- {
- return new WorkletScriptLoader(scriptPromiseResolver, worklet, resource);
- }
-
- ~WorkletScriptLoader() override = default;
-
- // Cancels loading of {@code m_resource}.
- //
- // Typically it gets called when WorkletScriptLoader's host is about to be disposed off.
- void cancel();
-
- DECLARE_TRACE();
-
-private:
- // Default constructor.
- //
- // @param resolver Promise resolver that is used to reject/resolve the promise on ScriptResourceClient::notifyFinished event.
- // @param host Host that needs be notified when the resource is downloaded.
- // @param resource that needs to be downloaded.
- WorkletScriptLoader(ScriptPromiseResolver*, Worklet* host, ScriptResource*);
-
- // ResourceClient
- void notifyFinished(Resource*) final;
- String debugName() const final { return "WorkletLoader"; }
-
- Member<ScriptPromiseResolver> m_resolver;
- Member<Worklet> m_host;
-};
-
-} // namespace blink
-
-#endif // WorkletScriptLoader_h

Powered by Google App Engine
This is Rietveld 408576698