OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef ImageBitmap_h | 5 #ifndef ImageBitmap_h |
6 #define ImageBitmap_h | 6 #define ImageBitmap_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/html/HTMLImageElement.h" | 10 #include "core/html/HTMLImageElement.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 IntSize size() const; | 44 IntSize size() const; |
45 | 45 |
46 bool isNeutered() const { return m_isNeutered; } | 46 bool isNeutered() const { return m_isNeutered; } |
47 bool originClean() const { return m_image->originClean(); } | 47 bool originClean() const { return m_image->originClean(); } |
48 PassRefPtr<StaticBitmapImage> transfer(); | 48 PassRefPtr<StaticBitmapImage> transfer(); |
49 void close(); | 49 void close(); |
50 | 50 |
51 ~ImageBitmap() override; | 51 ~ImageBitmap() override; |
52 | 52 |
53 // CanvasImageSource implementation | 53 // CanvasImageSource implementation |
54 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt) const override; | 54 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason) const override; |
55 bool wouldTaintOrigin(SecurityOrigin*) const override { return !m_image->ori
ginClean(); } | 55 bool wouldTaintOrigin(SecurityOrigin*) const override { return !m_image->ori
ginClean(); } |
56 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; | 56 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; |
57 FloatSize elementSize() const override; | 57 FloatSize elementSize() const override; |
58 | 58 |
59 // ImageBitmapSource implementation | 59 // ImageBitmapSource implementation |
60 IntSize bitmapSourceSize() const override { return size(); } | 60 IntSize bitmapSourceSize() const override { return size(); } |
61 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy,
int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override; | 61 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy,
int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override; |
62 | 62 |
63 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
64 | 64 |
(...skipping 10 matching lines...) Expand all Loading... |
75 void notifyImageSourceChanged() override; | 75 void notifyImageSourceChanged() override; |
76 bool requestsHighLiveResourceCachePriority() override { return true; } | 76 bool requestsHighLiveResourceCachePriority() override { return true; } |
77 | 77 |
78 RefPtr<StaticBitmapImage> m_image; | 78 RefPtr<StaticBitmapImage> m_image; |
79 bool m_isNeutered = false; | 79 bool m_isNeutered = false; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
83 | 83 |
84 #endif // ImageBitmap_h | 84 #endif // ImageBitmap_h |
OLD | NEW |