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 #ifndef NullExecutionContext_h | 5 #ifndef NullExecutionContext_h |
6 #define NullExecutionContext_h | 6 #define NullExecutionContext_h |
7 | 7 |
8 #include "bindings/core/v8/SourceLocation.h" | 8 #include "bindings/core/v8/SourceLocation.h" |
9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
10 #include "core/dom/SecurityContext.h" | 10 #include "core/dom/SecurityContext.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 bool tasksNeedSuspension() override { return m_tasksNeedSuspension; } | 32 bool tasksNeedSuspension() override { return m_tasksNeedSuspension; } |
33 void setTasksNeedSuspension(bool flag) { m_tasksNeedSuspension = flag; } | 33 void setTasksNeedSuspension(bool flag) { m_tasksNeedSuspension = flag; } |
34 | 34 |
35 void reportBlockedScriptExecutionToInspector(const String& directiveText) ov
erride { } | 35 void reportBlockedScriptExecutionToInspector(const String& directiveText) ov
erride { } |
36 void didUpdateSecurityOrigin() override { } | 36 void didUpdateSecurityOrigin() override { } |
37 SecurityContext& securityContext() override { return *this; } | 37 SecurityContext& securityContext() override { return *this; } |
38 DOMTimerCoordinator* timers() override { return nullptr; } | 38 DOMTimerCoordinator* timers() override { return nullptr; } |
39 | 39 |
40 void addConsoleMessage(ConsoleMessage*) override { } | 40 void addConsoleMessage(ConsoleMessage*) override { } |
41 void logExceptionToConsole(const String& errorMessage, std::unique_ptr<Sourc
eLocation>) override { } | 41 void exceptionThrown(const String& errorMessage, std::unique_ptr<SourceLocat
ion>) override { } |
42 | 42 |
43 void setIsSecureContext(bool); | 43 void setIsSecureContext(bool); |
44 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa
rdSecureContextCheck) const override; | 44 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa
rdSecureContextCheck) const override; |
45 | 45 |
46 DEFINE_INLINE_TRACE() | 46 DEFINE_INLINE_TRACE() |
47 { | 47 { |
48 visitor->trace(m_queue); | 48 visitor->trace(m_queue); |
49 SecurityContext::trace(visitor); | 49 SecurityContext::trace(visitor); |
50 ExecutionContext::trace(visitor); | 50 ExecutionContext::trace(visitor); |
51 } | 51 } |
52 | 52 |
53 protected: | 53 protected: |
54 const KURL& virtualURL() const override { return m_dummyURL; } | 54 const KURL& virtualURL() const override { return m_dummyURL; } |
55 KURL virtualCompleteURL(const String&) const override { return m_dummyURL; } | 55 KURL virtualCompleteURL(const String&) const override { return m_dummyURL; } |
56 | 56 |
57 private: | 57 private: |
58 bool m_tasksNeedSuspension; | 58 bool m_tasksNeedSuspension; |
59 bool m_isSecureContext; | 59 bool m_isSecureContext; |
60 Member<EventQueue> m_queue; | 60 Member<EventQueue> m_queue; |
61 | 61 |
62 KURL m_dummyURL; | 62 KURL m_dummyURL; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace blink | 65 } // namespace blink |
66 | 66 |
67 #endif // NullExecutionContext_h | 67 #endif // NullExecutionContext_h |
OLD | NEW |