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 14 matching lines...) Expand all Loading... |
25 String userAgent() const override { return String(); } | 25 String userAgent() const override { return String(); } |
26 | 26 |
27 void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionContextTask>
, const String& taskNameForInstrumentation = emptyString()) override; | 27 void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionContextTask>
, const String& taskNameForInstrumentation = emptyString()) override; |
28 | 28 |
29 EventTarget* errorEventTarget() override { return nullptr; } | 29 EventTarget* errorEventTarget() override { return nullptr; } |
30 EventQueue* getEventQueue() const override { return m_queue.get(); } | 30 EventQueue* getEventQueue() const override { return m_queue.get(); } |
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 { } | |
36 void didUpdateSecurityOrigin() override { } | 35 void didUpdateSecurityOrigin() override { } |
37 SecurityContext& securityContext() override { return *this; } | 36 SecurityContext& securityContext() override { return *this; } |
38 DOMTimerCoordinator* timers() override { return nullptr; } | 37 DOMTimerCoordinator* timers() override { return nullptr; } |
39 | 38 |
40 void addConsoleMessage(ConsoleMessage*) override { } | 39 void addConsoleMessage(ConsoleMessage*) override { } |
41 void exceptionThrown(const String& errorMessage, std::unique_ptr<SourceLocat
ion>) override { } | 40 void exceptionThrown(const String& errorMessage, std::unique_ptr<SourceLocat
ion>) override { } |
42 | 41 |
43 void setIsSecureContext(bool); | 42 void setIsSecureContext(bool); |
44 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa
rdSecureContextCheck) const override; | 43 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa
rdSecureContextCheck) const override; |
45 | 44 |
(...skipping 12 matching lines...) Expand all Loading... |
58 bool m_tasksNeedSuspension; | 57 bool m_tasksNeedSuspension; |
59 bool m_isSecureContext; | 58 bool m_isSecureContext; |
60 Member<EventQueue> m_queue; | 59 Member<EventQueue> m_queue; |
61 | 60 |
62 KURL m_dummyURL; | 61 KURL m_dummyURL; |
63 }; | 62 }; |
64 | 63 |
65 } // namespace blink | 64 } // namespace blink |
66 | 65 |
67 #endif // NullExecutionContext_h | 66 #endif // NullExecutionContext_h |
OLD | NEW |