| 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& GetImageLoader() 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* destination_security_origin) const override; | |
| 29 | |
| 30 FloatSize ElementSize(const FloatSize& default_object_size) const override; | |
| 31 FloatSize DefaultDestinationSize( | |
| 32 const FloatSize& default_object_size) 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& GetElement() const; | |
| 48 }; | |
| 49 | |
| 50 } // namespace blink | |
| 51 | |
| 52 #endif // CanvasImageElementSource_h | |
| OLD | NEW |