OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/testing/NullExecutionContext.h" | 5 #include "core/testing/NullExecutionContext.h" |
6 | 6 |
7 #include "core/dom/ExecutionContextTask.h" | 7 #include "core/dom/ExecutionContextTask.h" |
8 #include "core/events/Event.h" | 8 #include "core/events/Event.h" |
9 #include "core/frame/DOMTimer.h" | 9 #include "core/frame/DOMTimer.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 NullExecutionContext::NullExecutionContext() | 26 NullExecutionContext::NullExecutionContext() |
27 : m_tasksNeedSuspension(false) | 27 : m_tasksNeedSuspension(false) |
28 , m_isSecureContext(true) | 28 , m_isSecureContext(true) |
29 , m_queue(new NullEventQueue()) | 29 , m_queue(new NullEventQueue()) |
30 { | 30 { |
31 } | 31 } |
32 | 32 |
33 void NullExecutionContext::postTask(const WebTraceLocation&, std::unique_ptr<Exe
cutionContextTask>) | 33 void NullExecutionContext::postTask(const WebTraceLocation&, std::unique_ptr<Exe
cutionContextTask>, const String&) |
34 { | 34 { |
35 } | 35 } |
36 | 36 |
37 void NullExecutionContext::setIsSecureContext(bool isSecureContext) | 37 void NullExecutionContext::setIsSecureContext(bool isSecureContext) |
38 { | 38 { |
39 m_isSecureContext = isSecureContext; | 39 m_isSecureContext = isSecureContext; |
40 } | 40 } |
41 | 41 |
42 bool NullExecutionContext::isSecureContext(String& errorMessage, const SecureCon
textCheck privilegeContextCheck) const | 42 bool NullExecutionContext::isSecureContext(String& errorMessage, const SecureCon
textCheck privilegeContextCheck) const |
43 { | 43 { |
44 if (!m_isSecureContext) | 44 if (!m_isSecureContext) |
45 errorMessage = "A secure context is required"; | 45 errorMessage = "A secure context is required"; |
46 return m_isSecureContext; | 46 return m_isSecureContext; |
47 } | 47 } |
48 | 48 |
49 } // namespace blink | 49 } // namespace blink |
OLD | NEW |