Chromium Code Reviews| 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; |
|
haraken
2016/04/11 02:18:14
It's a bit nasty to bypass the core/ => modules/ d
ikilpatrick
2016/04/11 22:34:23
I just wanted to check if this is what you meant b
haraken
2016/04/12 00:44:20
Ah, thanks -- I now understand it would be more na
ikilpatrick
2016/04/12 03:08:09
So at CSSPaintValue create time we don't have acce
haraken
2016/04/12 04:02:43
Thanks, I think our conclusion is that we need a b
|
| +} |
| + |
| +// static |
| +CSSPaintImageGenerator* CSSPaintImageGenerator::create(const String& name, Document& document, Observer* observer) |
| +{ |
| + ASSERT(s_createFunction); |
| + return s_createFunction(name, document, observer); |
| +} |
| + |
| +CSSPaintImageGenerator::~CSSPaintImageGenerator() |
| +{ |
| +} |
| + |
| +} // namespace blink |