| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/css/CSSPaintImageGenerator.h" | 5 #include "core/css/CSSPaintImageGenerator.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 CSSPaintImageGenerator::CSSPaintImageGeneratorCreateFunction s_createFunction = | 11 CSSPaintImageGenerator::CSSPaintImageGeneratorCreateFunction s_createFunction = |
| 12 nullptr; | 12 nullptr; |
| 13 | 13 |
| 14 } // namespace | 14 } // namespace |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 void CSSPaintImageGenerator::init( | 17 void CSSPaintImageGenerator::init( |
| 18 CSSPaintImageGeneratorCreateFunction createFunction) { | 18 CSSPaintImageGeneratorCreateFunction createFunction) { |
| 19 ASSERT(!s_createFunction); | 19 DCHECK(!s_createFunction); |
| 20 s_createFunction = createFunction; | 20 s_createFunction = createFunction; |
| 21 } | 21 } |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 CSSPaintImageGenerator* CSSPaintImageGenerator::create(const String& name, | 24 CSSPaintImageGenerator* CSSPaintImageGenerator::create(const String& name, |
| 25 Document& document, | 25 Document& document, |
| 26 Observer* observer) { | 26 Observer* observer) { |
| 27 ASSERT(s_createFunction); | 27 DCHECK(s_createFunction); |
| 28 return s_createFunction(name, document, observer); | 28 return s_createFunction(name, document, observer); |
| 29 } | 29 } |
| 30 | 30 |
| 31 CSSPaintImageGenerator::~CSSPaintImageGenerator() {} | 31 CSSPaintImageGenerator::~CSSPaintImageGenerator() {} |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| OLD | NEW |