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

Unified Diff: third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp

Issue 2896773002: [DONT COMMIT] PaintWorklet: Move paintWorklet from 'window' to 'CSS' (Closed)
Patch Set: WIP 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
diff --git a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
deleted file mode 100644
index 597c9ee072bceaa80a4695f7235eb90fd71c443a..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
+++ /dev/null
@@ -1,47 +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/csspaint/WindowPaintWorklet.h"
-
-#include "core/frame/LocalDOMWindow.h"
-#include "core/frame/LocalFrame.h"
-#include "modules/csspaint/PaintWorklet.h"
-
-namespace blink {
-
-WindowPaintWorklet::WindowPaintWorklet(LocalDOMWindow& window)
- : Supplement<LocalDOMWindow>(window) {}
-
-const char* WindowPaintWorklet::SupplementName() {
- return "WindowPaintWorklet";
-}
-
-// static
-WindowPaintWorklet& WindowPaintWorklet::From(LocalDOMWindow& window) {
- WindowPaintWorklet* supplement = static_cast<WindowPaintWorklet*>(
- Supplement<LocalDOMWindow>::From(window, SupplementName()));
- if (!supplement) {
- supplement = new WindowPaintWorklet(window);
- ProvideTo(window, SupplementName(), supplement);
- }
- return *supplement;
-}
-
-// static
-Worklet* WindowPaintWorklet::paintWorklet(LocalDOMWindow& window) {
- return From(window).paintWorklet();
-}
-
-PaintWorklet* WindowPaintWorklet::paintWorklet() {
- if (!paint_worklet_ && GetSupplementable()->GetFrame())
- paint_worklet_ = PaintWorklet::Create(GetSupplementable()->GetFrame());
- return paint_worklet_.Get();
-}
-
-DEFINE_TRACE(WindowPaintWorklet) {
- visitor->Trace(paint_worklet_);
- Supplement<LocalDOMWindow>::Trace(visitor);
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698