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 WorkletGlobalScope_h | 5 #ifndef WorkletGlobalScope_h |
6 #define WorkletGlobalScope_h | 6 #define WorkletGlobalScope_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/dom/ExecutionContext.h" | 10 #include "core/dom/ExecutionContext.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 void disableEval(const String& errorMessage) final; | 41 void disableEval(const String& errorMessage) final; |
42 String userAgent() const final { return m_userAgent; } | 42 String userAgent() const final { return m_userAgent; } |
43 SecurityContext& securityContext() final { return *this; } | 43 SecurityContext& securityContext() final { return *this; } |
44 EventQueue* getEventQueue() const final { NOTREACHED(); return nullptr; } //
WorkletGlobalScopes don't have an event queue. | 44 EventQueue* getEventQueue() const final { NOTREACHED(); return nullptr; } //
WorkletGlobalScopes don't have an event queue. |
45 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa
rdSecureContextCheck) const final; | 45 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa
rdSecureContextCheck) const final; |
46 | 46 |
47 using SecurityContext::getSecurityOrigin; | 47 using SecurityContext::getSecurityOrigin; |
48 using SecurityContext::contentSecurityPolicy; | 48 using SecurityContext::contentSecurityPolicy; |
49 | 49 |
50 DOMTimerCoordinator* timers() final { NOTREACHED(); return nullptr; } // Wor
kletGlobalScopes don't have timers. | 50 DOMTimerCoordinator* timers() final { NOTREACHED(); return nullptr; } // Wor
kletGlobalScopes don't have timers. |
51 void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionContextTask>
) override | 51 void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionContextTask>
, const String&) override |
52 { | 52 { |
53 // TODO(ikilpatrick): implement. | 53 // TODO(ikilpatrick): implement. |
54 NOTREACHED(); | 54 NOTREACHED(); |
55 } | 55 } |
56 | 56 |
57 void reportBlockedScriptExecutionToInspector(const String& directiveText) fi
nal; | 57 void reportBlockedScriptExecutionToInspector(const String& directiveText) fi
nal; |
58 void logExceptionToConsole(const String& errorMessage, std::unique_ptr<Sourc
eLocation>) final; | 58 void logExceptionToConsole(const String& errorMessage, std::unique_ptr<Sourc
eLocation>) final; |
59 | 59 |
60 DECLARE_VIRTUAL_TRACE(); | 60 DECLARE_VIRTUAL_TRACE(); |
61 | 61 |
(...skipping 12 matching lines...) Expand all Loading... |
74 KURL m_url; | 74 KURL m_url; |
75 String m_userAgent; | 75 String m_userAgent; |
76 Member<WorkerOrWorkletScriptController> m_scriptController; | 76 Member<WorkerOrWorkletScriptController> m_scriptController; |
77 }; | 77 }; |
78 | 78 |
79 DEFINE_TYPE_CASTS(WorkletGlobalScope, ExecutionContext, context, context->isWork
letGlobalScope(), context.isWorkletGlobalScope()); | 79 DEFINE_TYPE_CASTS(WorkletGlobalScope, ExecutionContext, context, context->isWork
letGlobalScope(), context.isWorkletGlobalScope()); |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
82 | 82 |
83 #endif // WorkletGlobalScope_h | 83 #endif // WorkletGlobalScope_h |
OLD | NEW |