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

Unified Diff: third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h

Issue 2253813002: Use ParentFrameTaskRunners for encodeImageOnEncoderThread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h
diff --git a/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h b/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h
index 5c105eb3cc4c1cfd42f9bb020694098ea576ec73..bb4cecab5b107085048cc157c7f9bd19283856c7 100644
--- a/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h
+++ b/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h
@@ -31,9 +31,10 @@ class CORE_EXPORT ParentFrameTaskRunners final : public GarbageCollectedFinalize
WTF_MAKE_NONCOPYABLE(ParentFrameTaskRunners);
public:
- // LocalFrame could be nullptr if the worker is not associated with a
- // particular local frame.
- explicit ParentFrameTaskRunners(LocalFrame*);
+ static ParentFrameTaskRunners* create(LocalFrame* frame)
+ {
+ return new ParentFrameTaskRunners(frame);
+ }
// Might return nullptr for unsupported task types.
WebTaskRunner* get(TaskType);
@@ -43,6 +44,10 @@ public:
private:
using TaskRunnerHashMap = HashMap<TaskType, WebTaskRunner*, WTF::IntHash<TaskType>, TaskTypeTraits>;
+ // LocalFrame could be nullptr if the worker is not associated with a
+ // particular local frame.
+ explicit ParentFrameTaskRunners(LocalFrame*);
+
void contextDestroyed() override;
Mutex m_taskRunnersMutex;

Powered by Google App Engine
This is Rietveld 408576698