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

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

Issue 2856773003: Remove deprecated ExecutionContextTask (Closed)
Patch Set: restore private / rebase Created 3 years, 6 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 12 matching lines...) Expand all
23 USING_GARBAGE_COLLECTED_MIXIN(NullExecutionContext); 23 USING_GARBAGE_COLLECTED_MIXIN(NullExecutionContext);
24 24
25 public: 25 public:
26 NullExecutionContext(); 26 NullExecutionContext();
27 27
28 void SetURL(const KURL& url) { url_ = url; } 28 void SetURL(const KURL& url) { url_ = url; }
29 29
30 void DisableEval(const String&) override {} 30 void DisableEval(const String&) override {}
31 String UserAgent() const override { return String(); } 31 String UserAgent() const override { return String(); }
32 32
33 void PostTask(
34 TaskType,
35 const WebTraceLocation&,
36 std::unique_ptr<ExecutionContextTask>,
37 const String& task_name_for_instrumentation = g_empty_string) override;
38
39 EventTarget* ErrorEventTarget() override { return nullptr; } 33 EventTarget* ErrorEventTarget() override { return nullptr; }
40 EventQueue* GetEventQueue() const override { return queue_.Get(); } 34 EventQueue* GetEventQueue() const override { return queue_.Get(); }
41 35
42 bool TasksNeedSuspension() override { return tasks_need_suspension_; } 36 bool TasksNeedSuspension() override { return tasks_need_suspension_; }
43 void SetTasksNeedSuspension(bool flag) { tasks_need_suspension_ = flag; } 37 void SetTasksNeedSuspension(bool flag) { tasks_need_suspension_ = flag; }
44 38
45 void DidUpdateSecurityOrigin() override {} 39 void DidUpdateSecurityOrigin() override {}
46 SecurityContext& GetSecurityContext() override { return *this; } 40 SecurityContext& GetSecurityContext() override { return *this; }
47 DOMTimerCoordinator* Timers() override { return nullptr; } 41 DOMTimerCoordinator* Timers() override { return nullptr; }
48 42
(...skipping 22 matching lines...) Expand all
71 bool tasks_need_suspension_; 65 bool tasks_need_suspension_;
72 bool is_secure_context_; 66 bool is_secure_context_;
73 Member<EventQueue> queue_; 67 Member<EventQueue> queue_;
74 68
75 KURL url_; 69 KURL url_;
76 }; 70 };
77 71
78 } // namespace blink 72 } // namespace blink
79 73
80 #endif // NullExecutionContext_h 74 #endif // NullExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698