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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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 14 matching lines...) Expand all
25 public: 25 public:
26 NullExecutionContext(); 26 NullExecutionContext();
27 27
28 void disableEval(const String&) override {} 28 void disableEval(const String&) override {}
29 String userAgent() const override { return String(); } 29 String userAgent() const override { return String(); }
30 30
31 void postTask( 31 void postTask(
32 TaskType, 32 TaskType,
33 const WebTraceLocation&, 33 const WebTraceLocation&,
34 std::unique_ptr<ExecutionContextTask>, 34 std::unique_ptr<ExecutionContextTask>,
35 const String& taskNameForInstrumentation = emptyString()) override; 35 const String& taskNameForInstrumentation = emptyString) override;
36 36
37 EventTarget* errorEventTarget() override { return nullptr; } 37 EventTarget* errorEventTarget() override { return nullptr; }
38 EventQueue* getEventQueue() const override { return m_queue.get(); } 38 EventQueue* getEventQueue() const override { return m_queue.get(); }
39 39
40 bool tasksNeedSuspension() override { return m_tasksNeedSuspension; } 40 bool tasksNeedSuspension() override { return m_tasksNeedSuspension; }
41 void setTasksNeedSuspension(bool flag) { m_tasksNeedSuspension = flag; } 41 void setTasksNeedSuspension(bool flag) { m_tasksNeedSuspension = flag; }
42 42
43 void didUpdateSecurityOrigin() override {} 43 void didUpdateSecurityOrigin() override {}
44 SecurityContext& securityContext() override { return *this; } 44 SecurityContext& securityContext() override { return *this; }
45 DOMTimerCoordinator* timers() override { return nullptr; } 45 DOMTimerCoordinator* timers() override { return nullptr; }
(...skipping 20 matching lines...) Expand all
66 bool m_tasksNeedSuspension; 66 bool m_tasksNeedSuspension;
67 bool m_isSecureContext; 67 bool m_isSecureContext;
68 Member<EventQueue> m_queue; 68 Member<EventQueue> m_queue;
69 69
70 KURL m_dummyURL; 70 KURL m_dummyURL;
71 }; 71 };
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 #endif // NullExecutionContext_h 75 #endif // NullExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698