| 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 #include "modules/worklet/WorkletGlobalScope.h" | 5 #include "modules/worklet/WorkletGlobalScope.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 7 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
| 8 #include "core/frame/FrameConsole.h" | 8 #include "core/frame/FrameConsole.h" |
| 9 #include "core/inspector/InspectorInstrumentation.h" | 9 #include "core/inspector/InspectorInstrumentation.h" |
| 10 #include "modules/worklet/WorkletConsole.h" | 10 #include "modules/worklet/WorkletConsole.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void WorkletGlobalScope::disableEval(const String& errorMessage) | 56 void WorkletGlobalScope::disableEval(const String& errorMessage) |
| 57 { | 57 { |
| 58 m_scriptController->disableEval(errorMessage); | 58 m_scriptController->disableEval(errorMessage); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool WorkletGlobalScope::isSecureContext(String& errorMessage, const SecureConte
xtCheck privilegeContextCheck) const | 61 bool WorkletGlobalScope::isSecureContext(String& errorMessage, const SecureConte
xtCheck privilegeContextCheck) const |
| 62 { | 62 { |
| 63 // Until there are APIs that are available in worklets and that | 63 // Until there are APIs that are available in worklets and that |
| 64 // require a privileged context test that checks ancestors, just do | 64 // require a privileged context test that checks ancestors, just do |
| 65 // a simple check here. | 65 // a simple check here. |
| 66 if (securityOrigin()->isPotentiallyTrustworthy()) | 66 if (getSecurityOrigin()->isPotentiallyTrustworthy()) |
| 67 return true; | 67 return true; |
| 68 errorMessage = securityOrigin()->isPotentiallyTrustworthyErrorMessage(); | 68 errorMessage = getSecurityOrigin()->isPotentiallyTrustworthyErrorMessage(); |
| 69 return false; | 69 return false; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void WorkletGlobalScope::reportBlockedScriptExecutionToInspector(const String& d
irectiveText) | 72 void WorkletGlobalScope::reportBlockedScriptExecutionToInspector(const String& d
irectiveText) |
| 73 { | 73 { |
| 74 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); | 74 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WorkletGlobalScope::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage
> prpConsoleMessage) | 77 void WorkletGlobalScope::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage
> prpConsoleMessage) |
| 78 { | 78 { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 102 DEFINE_TRACE(WorkletGlobalScope) | 102 DEFINE_TRACE(WorkletGlobalScope) |
| 103 { | 103 { |
| 104 visitor->trace(m_scriptController); | 104 visitor->trace(m_scriptController); |
| 105 visitor->trace(m_console); | 105 visitor->trace(m_console); |
| 106 ExecutionContext::trace(visitor); | 106 ExecutionContext::trace(visitor); |
| 107 SecurityContext::trace(visitor); | 107 SecurityContext::trace(visitor); |
| 108 LocalFrameLifecycleObserver::trace(visitor); | 108 LocalFrameLifecycleObserver::trace(visitor); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |