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

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

Issue 2716853002: (WIP) Worker: Merge ParentFrameTaskRunners into TaskRunnerHelper
Patch Set: WIP 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 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
deleted file mode 100644
index 765b40324e8b4c236a32d8d1d116db44f32f616b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ParentFrameTaskRunners_h
-#define ParentFrameTaskRunners_h
-
-#include "core/CoreExport.h"
-#include "core/dom/ContextLifecycleObserver.h"
-#include "core/dom/TaskRunnerHelper.h"
-#include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
-
-namespace blink {
-
-class LocalFrame;
-class WebTaskRunner;
-
-// Represents a set of task runners of the parent (or associated) document's
-// frame. This could be accessed from worker thread(s) and must be initialized
-// on the parent context thread (i.e. MainThread) on construction time, rather
-// than being done lazily.
-//
-// This observes LocalFrame lifecycle only for in-process worker cases (i.e.
-// only when a non-null LocalFrame is given).
-class CORE_EXPORT ParentFrameTaskRunners final
- : public GarbageCollectedFinalized<ParentFrameTaskRunners>,
- public ContextLifecycleObserver {
- USING_GARBAGE_COLLECTED_MIXIN(ParentFrameTaskRunners);
- WTF_MAKE_NONCOPYABLE(ParentFrameTaskRunners);
-
- public:
- static ParentFrameTaskRunners* create(LocalFrame* frame) {
- return new ParentFrameTaskRunners(frame);
- }
-
- // Might return nullptr for unsupported task types.
- RefPtr<WebTaskRunner> get(TaskType);
-
- DECLARE_VIRTUAL_TRACE();
-
- private:
- using TaskRunnerHashMap = HashMap<TaskType,
- RefPtr<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(ExecutionContext*) override;
-
- Mutex m_taskRunnersMutex;
- TaskRunnerHashMap m_taskRunners;
-};
-
-} // namespace blink
-
-#endif // ParentFrameTaskRunners_h

Powered by Google App Engine
This is Rietveld 408576698