| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 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 CanvasImageElementSource_h | |
| 6 #define CanvasImageElementSource_h | |
| 7 | |
| 8 #include "core/CoreExport.h" | |
| 9 #include "core/html/canvas/CanvasImageSource.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class Element; | |
| 14 class ImageLoader; | |
| 15 class ImageResourceContent; | |
| 16 | |
| 17 class CORE_EXPORT CanvasImageElementSource : public CanvasImageSource { | |
| 18 public: | |
| 19 virtual ImageLoader& imageLoader() const = 0; | |
| 20 virtual FloatSize sourceDefaultObjectSize() = 0; | |
| 21 | |
| 22 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, | |
| 23 AccelerationHint, | |
| 24 SnapshotReason, | |
| 25 const FloatSize&) const override; | |
| 26 | |
| 27 bool wouldTaintOrigin( | |
| 28 SecurityOrigin* destinationSecurityOrigin) const override; | |
| 29 | |
| 30 FloatSize elementSize(const FloatSize& defaultObjectSize) const override; | |
| 31 FloatSize defaultDestinationSize( | |
| 32 const FloatSize& defaultObjectSize) const override; | |
| 33 | |
| 34 bool isAccelerated() const override; | |
| 35 | |
| 36 int sourceWidth() override; | |
| 37 int sourceHeight() override; | |
| 38 | |
| 39 bool isSVGSource() const override; | |
| 40 | |
| 41 bool isOpaque() const override; | |
| 42 | |
| 43 const KURL& sourceURL() const override; | |
| 44 | |
| 45 private: | |
| 46 ImageResourceContent* cachedImage() const; | |
| 47 const Element& element() const; | |
| 48 }; | |
| 49 | |
| 50 } // namespace blink | |
| 51 | |
| 52 #endif // CanvasImageElementSource_h | |
| OLD | NEW |