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

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

Issue 1882003002: include RefCounted.h where needed, only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 4 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/ScriptCallStack.h" 8 #include "bindings/core/v8/ScriptCallStack.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"
11 #include "core/events/EventQueue.h" 11 #include "core/events/EventQueue.h"
12 #include "core/inspector/ConsoleMessage.h" 12 #include "core/inspector/ConsoleMessage.h"
13 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
14 #include "platform/weborigin/KURL.h" 14 #include "platform/weborigin/KURL.h"
15 #include "wtf/RefCounted.h"
16 15
17 namespace blink { 16 namespace blink {
18 17
19 class NullExecutionContext final : public GarbageCollectedFinalized<NullExecutio nContext>, public SecurityContext, public ExecutionContext { 18 class NullExecutionContext final : public GarbageCollectedFinalized<NullExecutio nContext>, public SecurityContext, public ExecutionContext {
20 USING_GARBAGE_COLLECTED_MIXIN(NullExecutionContext); 19 USING_GARBAGE_COLLECTED_MIXIN(NullExecutionContext);
21 public: 20 public:
22 NullExecutionContext(); 21 NullExecutionContext();
23 22
24 void disableEval(const String&) override { } 23 void disableEval(const String&) override { }
25 String userAgent() const override { return String(); } 24 String userAgent() const override { return String(); }
(...skipping 17 matching lines...) Expand all
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
46 DEFINE_INLINE_TRACE() 45 DEFINE_INLINE_TRACE()
47 { 46 {
48 visitor->trace(m_queue); 47 visitor->trace(m_queue);
49 SecurityContext::trace(visitor); 48 SecurityContext::trace(visitor);
50 ExecutionContext::trace(visitor); 49 ExecutionContext::trace(visitor);
51 } 50 }
52 51
53 #if !ENABLE(OILPAN)
54 using RefCounted<NullExecutionContext>::ref;
55 using RefCounted<NullExecutionContext>::deref;
56
57 void refExecutionContext() override { ref(); }
58 void derefExecutionContext() override { deref(); }
59 #endif
60
61 protected: 52 protected:
62 const KURL& virtualURL() const override { return m_dummyURL; } 53 const KURL& virtualURL() const override { return m_dummyURL; }
63 KURL virtualCompleteURL(const String&) const override { return m_dummyURL; } 54 KURL virtualCompleteURL(const String&) const override { return m_dummyURL; }
64 55
65 private: 56 private:
66 bool m_tasksNeedSuspension; 57 bool m_tasksNeedSuspension;
67 bool m_isSecureContext; 58 bool m_isSecureContext;
68 Member<EventQueue> m_queue; 59 Member<EventQueue> m_queue;
69 60
70 KURL m_dummyURL; 61 KURL m_dummyURL;
71 }; 62 };
72 63
73 } // namespace blink 64 } // namespace blink
74 65
75 #endif // NullExecutionContext_h 66 #endif // NullExecutionContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/LayerRectList.h ('k') | third_party/WebKit/Source/core/testing/PrivateScriptTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698