OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PaintWorkletGlobalScopeProxy_h |
| 6 #define PaintWorkletGlobalScopeProxy_h |
| 7 |
| 8 #include "core/workers/WorkletGlobalScopeProxy.h" |
| 9 |
| 10 #include "modules/ModulesExport.h" |
| 11 #include "modules/csspaint/PaintWorkletGlobalScope.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class LocalFrame; |
| 16 |
| 17 class MODULES_EXPORT PaintWorkletGlobalScopeProxy |
| 18 : public WorkletGlobalScopeProxy { |
| 19 public: |
| 20 static std::unique_ptr<PaintWorkletGlobalScopeProxy> Create(LocalFrame*); |
| 21 static PaintWorkletGlobalScopeProxy* From(WorkletGlobalScopeProxy*); |
| 22 |
| 23 virtual ~PaintWorkletGlobalScopeProxy() = default; |
| 24 |
| 25 // Implements WorkletGlobalScopeProxy. |
| 26 void FetchAndInvokeScript(const KURL& module_url_record, |
| 27 WorkletPendingTasks*) override; |
| 28 void EvaluateScript(const ScriptSourceCode&) override; |
| 29 void TerminateWorkletGlobalScope() override; |
| 30 |
| 31 PaintWorkletGlobalScope* global_scope() const { return global_scope_.Get(); } |
| 32 |
| 33 private: |
| 34 explicit PaintWorkletGlobalScopeProxy(LocalFrame*); |
| 35 |
| 36 Persistent<PaintWorkletGlobalScope> global_scope_; |
| 37 }; |
| 38 |
| 39 } // namespace blink |
| 40 |
| 41 #endif // PaintWorkletGlobalScopeProxy_h |
OLD | NEW |