| OLD | NEW |
| 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 MainThreadWorkletGlobalScope_h | 5 #ifndef MainThreadWorkletGlobalScope_h |
| 6 #define MainThreadWorkletGlobalScope_h | 6 #define MainThreadWorkletGlobalScope_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | 9 #include "core/dom/ContextLifecycleObserver.h" |
| 10 #include "core/dom/ExecutionContext.h" | 10 #include "core/dom/ExecutionContext.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public: | 27 public: |
| 28 MainThreadWorkletGlobalScope(LocalFrame*, | 28 MainThreadWorkletGlobalScope(LocalFrame*, |
| 29 const KURL&, | 29 const KURL&, |
| 30 const String& user_agent, | 30 const String& user_agent, |
| 31 PassRefPtr<SecurityOrigin>, | 31 PassRefPtr<SecurityOrigin>, |
| 32 v8::Isolate*); | 32 v8::Isolate*); |
| 33 ~MainThreadWorkletGlobalScope() override; | 33 ~MainThreadWorkletGlobalScope() override; |
| 34 bool IsMainThreadWorkletGlobalScope() const final { return true; } | 34 bool IsMainThreadWorkletGlobalScope() const final { return true; } |
| 35 | 35 |
| 36 // WorkerOrWorkletGlobalScope | 36 // WorkerOrWorkletGlobalScope |
| 37 void CountFeature(UseCounter::Feature) final; | 37 void ReportFeature(UseCounter::Feature) override; |
| 38 void CountDeprecation(UseCounter::Feature) final; | 38 void ReportDeprecation(UseCounter::Feature) override; |
| 39 WorkerThread* GetThread() const final; | 39 WorkerThread* GetThread() const final; |
| 40 | 40 |
| 41 void FetchAndInvokeScript(const KURL& module_url_record, | 41 void FetchAndInvokeScript(const KURL& module_url_record, |
| 42 WorkletPendingTasks*); | 42 WorkletPendingTasks*); |
| 43 void Terminate(); | 43 void Terminate(); |
| 44 | 44 |
| 45 // WorkletScriptLoader::Client | 45 // WorkletScriptLoader::Client |
| 46 void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*, | 46 void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*, |
| 47 const ScriptSourceCode&) final; | 47 const ScriptSourceCode&) final; |
| 48 | 48 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 60 | 60 |
| 61 DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, | 61 DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, |
| 62 ExecutionContext, | 62 ExecutionContext, |
| 63 context, | 63 context, |
| 64 context->IsMainThreadWorkletGlobalScope(), | 64 context->IsMainThreadWorkletGlobalScope(), |
| 65 context.IsMainThreadWorkletGlobalScope()); | 65 context.IsMainThreadWorkletGlobalScope()); |
| 66 | 66 |
| 67 } // namespace blink | 67 } // namespace blink |
| 68 | 68 |
| 69 #endif // MainThreadWorkletGlobalScope_h | 69 #endif // MainThreadWorkletGlobalScope_h |
| OLD | NEW |