OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CSSPaintImageGeneratorImpl_h |
| 6 #define CSSPaintImageGeneratorImpl_h |
| 7 |
| 8 #include "bindings/core/v8/ScopedPersistent.h" |
| 9 #include "core/css/CSSPaintImageGenerator.h" |
| 10 #include "platform/geometry/IntSize.h" |
| 11 #include "platform/heap/Handle.h" |
| 12 #include <v8.h> |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class CSSPaintDefinition; |
| 17 class Document; |
| 18 class Image; |
| 19 |
| 20 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator { |
| 21 public: |
| 22 static CSSPaintImageGenerator* create(const String& name, Document&, Observe
r*); |
| 23 ~CSSPaintImageGeneratorImpl() override; |
| 24 |
| 25 PassRefPtr<Image> paint(const IntSize&) final; |
| 26 |
| 27 void setDefinition(CSSPaintDefinition*); |
| 28 |
| 29 DECLARE_VIRTUAL_TRACE(); |
| 30 |
| 31 private: |
| 32 CSSPaintImageGeneratorImpl(Observer*); |
| 33 CSSPaintImageGeneratorImpl(CSSPaintDefinition*); |
| 34 |
| 35 Member<CSSPaintDefinition> m_definition; |
| 36 Observer* m_observer; |
| 37 |
| 38 // An instance of the paint class is owned and kept alive by this class. |
| 39 ScopedPersistent<v8::Object> m_instance; |
| 40 }; |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // CSSPaintImageGeneratorImpl_h |
OLD | NEW |