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 CSSPaintImageGenerator_h |
| 6 #define CSSPaintImageGenerator_h |
| 7 |
| 8 #include "platform/geometry/IntSize.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class Document; |
| 14 class Image; |
| 15 |
| 16 class CSSPaintImageGenerator : public RefCountedWillBeGarbageCollected<CSSPaintI
mageGenerator> { |
| 17 public: |
| 18 class Observer { |
| 19 public: |
| 20 virtual ~Observer() { }; |
| 21 virtual void ready() = 0; |
| 22 }; |
| 23 |
| 24 static PassRefPtrWillBeRawPtr<CSSPaintImageGenerator> create(const String& n
ame, Document&, Observer*); |
| 25 |
| 26 typedef PassRefPtrWillBeRawPtr<CSSPaintImageGenerator> (*CSSPaintImageGenera
torCreateFunction)(const String&, Document&, Observer*); |
| 27 static void init(CSSPaintImageGeneratorCreateFunction); |
| 28 |
| 29 virtual PassRefPtr<Image> paint(const IntSize&) = 0; |
| 30 |
| 31 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 32 }; |
| 33 |
| 34 } // namespace blink |
| 35 |
| 36 #endif // CSSPaintImageGenerator_h |
OLD | NEW |