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 class WorkletObjectProxy; |
| 17 |
| 18 class MODULES_EXPORT PaintWorkletGlobalScopeProxy |
| 19 : public WorkletGlobalScopeProxy { |
| 20 public: |
| 21 static std::unique_ptr<PaintWorkletGlobalScopeProxy> Create( |
| 22 LocalFrame*, |
| 23 WorkletObjectProxy*); |
| 24 static PaintWorkletGlobalScopeProxy* From(WorkletGlobalScopeProxy*); |
| 25 |
| 26 virtual ~PaintWorkletGlobalScopeProxy() = default; |
| 27 |
| 28 // Implements WorkletGlobalScopeProxy. |
| 29 void FetchAndInvokeScript(int32_t request_id, |
| 30 const KURL& script_url) override; |
| 31 void EvaluateScript(const ScriptSourceCode&) override; |
| 32 void TerminateWorkletGlobalScope() override; |
| 33 |
| 34 PaintWorkletGlobalScope* global_scope() const { return global_scope_.Get(); } |
| 35 |
| 36 private: |
| 37 PaintWorkletGlobalScopeProxy(LocalFrame*, WorkletObjectProxy*); |
| 38 |
| 39 Persistent<PaintWorkletGlobalScope> global_scope_; |
| 40 }; |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // PaintWorkletGlobalScopeProxy_h |
OLD | NEW |