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

Unified Diff: third_party/WebKit/Source/modules/worklet/DOMWindowWorklet.cpp

Issue 1818223002: Introduce PaintWorkletGlobalScope, rename renderWorklet attribute to paintWorklet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix interface listing order. Created 4 years, 9 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/modules/worklet/DOMWindowWorklet.cpp
diff --git a/third_party/WebKit/Source/modules/worklet/DOMWindowWorklet.cpp b/third_party/WebKit/Source/modules/worklet/DOMWindowWorklet.cpp
deleted file mode 100644
index 07a4a32dba258e9ae7e023b52444318eb4160942..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/worklet/DOMWindowWorklet.cpp
+++ /dev/null
@@ -1,56 +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.
-
-#include "modules/worklet/DOMWindowWorklet.h"
-
-#include "core/frame/LocalDOMWindow.h"
-#include "core/frame/LocalFrame.h"
-#include "modules/worklet/Worklet.h"
-
-namespace blink {
-
-DOMWindowWorklet::DOMWindowWorklet(LocalDOMWindow& window)
- : DOMWindowProperty(window.frame())
-{
-}
-
-DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowWorklet);
-
-const char* DOMWindowWorklet::supplementName()
-{
- return "DOMWindowWorklet";
-}
-
-// static
-DOMWindowWorklet& DOMWindowWorklet::from(LocalDOMWindow& window)
-{
- DOMWindowWorklet* supplement = static_cast<DOMWindowWorklet*>(WillBeHeapSupplement<LocalDOMWindow>::from(window, supplementName()));
- if (!supplement) {
- supplement = new DOMWindowWorklet(window);
- provideTo(window, supplementName(), adoptPtrWillBeNoop(supplement));
- }
- return *supplement;
-}
-
-// static
-Worklet* DOMWindowWorklet::renderWorklet(ExecutionContext* executionContext, DOMWindow& window)
-{
- return from(toLocalDOMWindow(window)).renderWorklet(executionContext);
-}
-
-Worklet* DOMWindowWorklet::renderWorklet(ExecutionContext* executionContext) const
-{
- if (!m_renderWorklet && frame())
- m_renderWorklet = Worklet::create(frame(), executionContext);
- return m_renderWorklet.get();
-}
-
-DEFINE_TRACE(DOMWindowWorklet)
-{
- visitor->trace(m_renderWorklet);
- WillBeHeapSupplement<LocalDOMWindow>::trace(visitor);
- DOMWindowProperty::trace(visitor);
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698