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

Unified Diff: third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp

Issue 1866623002: Hook up CSSPaintValue::image to CSS Paint API callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments + rebase. Created 4 years, 8 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/css/CSSPaintImageGenerator.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp b/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c389bf4d6947b477a1300a7d5e5f0fc44de20bc0
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp
@@ -0,0 +1,33 @@
+// 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 "core/css/CSSPaintImageGenerator.h"
+
+namespace blink {
+
+namespace {
+
+CSSPaintImageGenerator::CSSPaintImageGeneratorCreateFunction s_createFunction = nullptr;
+
+} // namespace
+
+// static
+void CSSPaintImageGenerator::init(CSSPaintImageGeneratorCreateFunction createFunction)
+{
+ ASSERT(!s_createFunction);
+ s_createFunction = createFunction;
+}
+
+// static
+CSSPaintImageGenerator* CSSPaintImageGenerator::create(const String& name, Document& document, Observer* observer)
+{
+ ASSERT(s_createFunction);
+ return s_createFunction(name, document, observer);
+}
+
+CSSPaintImageGenerator::~CSSPaintImageGenerator()
+{
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h ('k') | third_party/WebKit/Source/core/css/CSSPaintValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698