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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void SetTasksNeedSuspension(bool flag) { tasks_need_suspension_ = flag; } | 43 void SetTasksNeedSuspension(bool flag) { tasks_need_suspension_ = flag; } |
44 | 44 |
45 void DidUpdateSecurityOrigin() override {} | 45 void DidUpdateSecurityOrigin() override {} |
46 SecurityContext& GetSecurityContext() override { return *this; } | 46 SecurityContext& GetSecurityContext() override { return *this; } |
47 DOMTimerCoordinator* Timers() override { return nullptr; } | 47 DOMTimerCoordinator* Timers() override { return nullptr; } |
48 | 48 |
49 void AddConsoleMessage(ConsoleMessage*) override {} | 49 void AddConsoleMessage(ConsoleMessage*) override {} |
50 void ExceptionThrown(ErrorEvent*) override {} | 50 void ExceptionThrown(ErrorEvent*) override {} |
51 | 51 |
52 void SetIsSecureContext(bool); | 52 void SetIsSecureContext(bool); |
53 bool IsSecureContext( | 53 bool IsSecureContext(String& error_message) const override; |
54 String& error_message, | |
55 const SecureContextCheck = kStandardSecureContextCheck) const override; | |
56 | 54 |
57 void SetUpSecurityContext(); | 55 void SetUpSecurityContext(); |
58 | 56 |
59 using SecurityContext::GetSecurityOrigin; | 57 using SecurityContext::GetSecurityOrigin; |
60 using SecurityContext::GetContentSecurityPolicy; | 58 using SecurityContext::GetContentSecurityPolicy; |
61 | 59 |
62 DEFINE_INLINE_TRACE() { | 60 DEFINE_INLINE_TRACE() { |
63 visitor->Trace(queue_); | 61 visitor->Trace(queue_); |
64 SecurityContext::Trace(visitor); | 62 SecurityContext::Trace(visitor); |
65 ExecutionContext::Trace(visitor); | 63 ExecutionContext::Trace(visitor); |
66 } | 64 } |
67 | 65 |
68 protected: | 66 protected: |
69 const KURL& VirtualURL() const override { return url_; } | 67 const KURL& VirtualURL() const override { return url_; } |
70 KURL VirtualCompleteURL(const String&) const override { return url_; } | 68 KURL VirtualCompleteURL(const String&) const override { return url_; } |
71 | 69 |
72 private: | 70 private: |
73 bool tasks_need_suspension_; | 71 bool tasks_need_suspension_; |
74 bool is_secure_context_; | 72 bool is_secure_context_; |
75 Member<EventQueue> queue_; | 73 Member<EventQueue> queue_; |
76 | 74 |
77 KURL url_; | 75 KURL url_; |
78 }; | 76 }; |
79 | 77 |
80 } // namespace blink | 78 } // namespace blink |
81 | 79 |
82 #endif // NullExecutionContext_h | 80 #endif // NullExecutionContext_h |
OLD | NEW |