Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Side by Side Diff: third_party/WebKit/Source/core/testing/NullExecutionContext.h

Issue 2823213002: Implement CanRequest in BaseFetchContext (Closed)
Patch Set: make it work with non-document Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 DOMTimerCoordinator* Timers() override { return nullptr; } 45 DOMTimerCoordinator* Timers() override { return nullptr; }
46 46
47 void AddConsoleMessage(ConsoleMessage*) override {} 47 void AddConsoleMessage(ConsoleMessage*) override {}
48 void ExceptionThrown(ErrorEvent*) override {} 48 void ExceptionThrown(ErrorEvent*) override {}
49 49
50 void SetIsSecureContext(bool); 50 void SetIsSecureContext(bool);
51 bool IsSecureContext( 51 bool IsSecureContext(
52 String& error_message, 52 String& error_message,
53 const SecureContextCheck = kStandardSecureContextCheck) const override; 53 const SecureContextCheck = kStandardSecureContextCheck) const override;
54 54
55 void SetUpSecurityContext();
56
55 DEFINE_INLINE_TRACE() { 57 DEFINE_INLINE_TRACE() {
56 visitor->Trace(queue_); 58 visitor->Trace(queue_);
57 SecurityContext::Trace(visitor); 59 SecurityContext::Trace(visitor);
58 ExecutionContext::Trace(visitor); 60 ExecutionContext::Trace(visitor);
59 } 61 }
60 62
61 protected: 63 protected:
62 const KURL& VirtualURL() const override { return dummy_url_; } 64 const KURL& VirtualURL() const override { return dummy_url_; }
63 KURL VirtualCompleteURL(const String&) const override { return dummy_url_; } 65 KURL VirtualCompleteURL(const String&) const override { return dummy_url_; }
64 66
65 private: 67 private:
66 bool tasks_need_suspension_; 68 bool tasks_need_suspension_;
67 bool is_secure_context_; 69 bool is_secure_context_;
68 Member<EventQueue> queue_; 70 Member<EventQueue> queue_;
69 71
70 KURL dummy_url_; 72 KURL dummy_url_;
71 }; 73 };
72 74
73 } // namespace blink 75 } // namespace blink
74 76
75 #endif // NullExecutionContext_h 77 #endif // NullExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698