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

Side by Side Diff: third_party/WebKit/Source/core/dom/TaskRunnerHelper.h

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 TaskRunnerHelper_h 5 #ifndef TaskRunnerHelper_h
6 #define TaskRunnerHelper_h 6 #define TaskRunnerHelper_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/HashTraits.h" 10 #include "wtf/HashTraits.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 }; 72 };
73 73
74 // A set of helper functions to get a WebTaskRunner for TaskType and a context 74 // A set of helper functions to get a WebTaskRunner for TaskType and a context
75 // object. The posted tasks are guaranteed to run in a sequence if they have the 75 // object. The posted tasks are guaranteed to run in a sequence if they have the
76 // same TaskType and the context objects belong to the same frame. 76 // same TaskType and the context objects belong to the same frame.
77 class CORE_EXPORT TaskRunnerHelper final { 77 class CORE_EXPORT TaskRunnerHelper final {
78 STATIC_ONLY(TaskRunnerHelper); 78 STATIC_ONLY(TaskRunnerHelper);
79 79
80 public: 80 public:
81 static WebTaskRunner* get(TaskType, LocalFrame*); 81 static RefPtr<WebTaskRunner> get(TaskType, LocalFrame*);
82 static WebTaskRunner* get(TaskType, Document*); 82 static RefPtr<WebTaskRunner> get(TaskType, Document*);
83 static WebTaskRunner* get(TaskType, ExecutionContext*); 83 static RefPtr<WebTaskRunner> get(TaskType, ExecutionContext*);
84 static WebTaskRunner* get(TaskType, ScriptState*); 84 static RefPtr<WebTaskRunner> get(TaskType, ScriptState*);
85 }; 85 };
86 86
87 } // namespace blink 87 } // namespace blink
88 88
89 #endif 89 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptRunner.cpp ('k') | third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698