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

Side by Side Diff: third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h

Issue 2911093002: Worklet: Move loader client impl from ThreadedWorklet to ThreadedWorkletMessagingProxy
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ThreadedWorkletMessagingProxy_h 5 #ifndef ThreadedWorkletMessagingProxy_h
6 #define ThreadedWorkletMessagingProxy_h 6 #define ThreadedWorkletMessagingProxy_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/workers/ThreadedMessagingProxyBase.h" 9 #include "core/workers/ThreadedMessagingProxyBase.h"
10 #include "core/workers/WorkletGlobalScopeProxy.h" 10 #include "core/workers/WorkletGlobalScopeProxy.h"
11 #include "core/workers/WorkletPendingTasks.h"
11 #include "platform/wtf/WeakPtr.h" 12 #include "platform/wtf/WeakPtr.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
16 class ScriptSourceCode;
15 class ThreadedWorkletObjectProxy; 17 class ThreadedWorkletObjectProxy;
16 18
17 class CORE_EXPORT ThreadedWorkletMessagingProxy 19 class CORE_EXPORT ThreadedWorkletMessagingProxy
18 : public ThreadedMessagingProxyBase, 20 : public ThreadedMessagingProxyBase,
19 public WorkletGlobalScopeProxy { 21 public WorkletGlobalScopeProxy {
20 public: 22 public:
21 // WorkletGlobalScopeProxy implementation. 23 // WorkletGlobalScopeProxy implementation.
22 void EvaluateScript(const ScriptSourceCode&) final; 24 void FetchAndInvokeScript(const KURL& module_url_record,
25 WebURLRequest::FetchCredentialsMode,
26 RefPtr<WebTaskRunner> outside_settings_task_runner,
27 WorkletPendingTasks*) final;
23 void TerminateWorkletGlobalScope() final; 28 void TerminateWorkletGlobalScope() final;
24 29
25 void Initialize(); 30 void Initialize();
31 void EvaluateScript(const ScriptSourceCode&);
26 32
27 protected: 33 protected:
28 explicit ThreadedWorkletMessagingProxy(ExecutionContext*); 34 explicit ThreadedWorkletMessagingProxy(ExecutionContext*);
29 35
30 ThreadedWorkletObjectProxy& WorkletObjectProxy() { 36 ThreadedWorkletObjectProxy& WorkletObjectProxy() {
31 return *worklet_object_proxy_; 37 return *worklet_object_proxy_;
32 } 38 }
33 39
34 private: 40 private:
35 friend class ThreadedWorkletMessagingProxyForTest; 41 friend class ThreadedWorkletMessagingProxyForTest;
36 42
37 std::unique_ptr<ThreadedWorkletObjectProxy> worklet_object_proxy_; 43 std::unique_ptr<ThreadedWorkletObjectProxy> worklet_object_proxy_;
38 44
39 WeakPtrFactory<ThreadedWorkletMessagingProxy> weak_ptr_factory_; 45 WeakPtrFactory<ThreadedWorkletMessagingProxy> weak_ptr_factory_;
40 }; 46 };
41 47
42 } // namespace blink 48 } // namespace blink
43 49
44 #endif // ThreadedWorkletMessagingProxy_h 50 #endif // ThreadedWorkletMessagingProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698