Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: third_party/WebKit/Source/core/frame/ImageBitmap.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "core/html/canvas/CanvasImageSource.h" 11 #include "core/html/canvas/CanvasImageSource.h"
12 #include "core/imagebitmap/ImageBitmapOptions.h" 12 #include "core/imagebitmap/ImageBitmapOptions.h"
13 #include "core/imagebitmap/ImageBitmapSource.h" 13 #include "core/imagebitmap/ImageBitmapSource.h"
14 #include "platform/geometry/IntRect.h" 14 #include "platform/geometry/IntRect.h"
15 #include "platform/graphics/Image.h" 15 #include "platform/graphics/Image.h"
16 #include "platform/graphics/ImageBuffer.h" 16 #include "platform/graphics/ImageBuffer.h"
17 #include "platform/graphics/StaticBitmapImage.h" 17 #include "platform/graphics/StaticBitmapImage.h"
18 #include "platform/heap/Handle.h" 18 #include "platform/heap/Handle.h"
19 #include "wtf/PassRefPtr.h" 19 #include "wtf/PassRefPtr.h"
20 #include "wtf/RefCounted.h" 20 #include "wtf/RefCounted.h"
21 21
22 namespace blink { 22 namespace blink {
23 23
24 class HTMLCanvasElement; 24 class HTMLCanvasElement;
25 class HTMLVideoElement; 25 class HTMLVideoElement;
26 class ImageData; 26 class ImageData;
27 27
28 class CORE_EXPORT ImageBitmap final : public RefCountedWillBeGarbageCollectedFin alized<ImageBitmap>, public ScriptWrappable, public ImageLoaderClient, public Ca nvasImageSource, public ImageBitmapSource { 28 class CORE_EXPORT ImageBitmap final : public GarbageCollectedFinalized<ImageBitm ap>, public ScriptWrappable, public ImageLoaderClient, public CanvasImageSource, public ImageBitmapSource {
29 DEFINE_WRAPPERTYPEINFO(); 29 DEFINE_WRAPPERTYPEINFO();
30 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ImageBitmap); 30 USING_GARBAGE_COLLECTED_MIXIN(ImageBitmap);
31 public: 31 public:
32 static PassRefPtrWillBeRawPtr<ImageBitmap> create(HTMLImageElement*, const I ntRect&, Document*, const ImageBitmapOptions& = ImageBitmapOptions()); 32 static RawPtr<ImageBitmap> create(HTMLImageElement*, const IntRect&, Documen t*, const ImageBitmapOptions& = ImageBitmapOptions());
33 static PassRefPtrWillBeRawPtr<ImageBitmap> create(HTMLVideoElement*, const I ntRect&, Document*, const ImageBitmapOptions& = ImageBitmapOptions()); 33 static RawPtr<ImageBitmap> create(HTMLVideoElement*, const IntRect&, Documen t*, const ImageBitmapOptions& = ImageBitmapOptions());
34 static PassRefPtrWillBeRawPtr<ImageBitmap> create(HTMLCanvasElement*, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions()); 34 static RawPtr<ImageBitmap> create(HTMLCanvasElement*, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions());
35 static PassRefPtrWillBeRawPtr<ImageBitmap> create(ImageData*, const IntRect& , const ImageBitmapOptions& = ImageBitmapOptions()); 35 static RawPtr<ImageBitmap> create(ImageData*, const IntRect&, const ImageBit mapOptions& = ImageBitmapOptions());
36 static PassRefPtrWillBeRawPtr<ImageBitmap> create(ImageBitmap*, const IntRec t&, const ImageBitmapOptions& = ImageBitmapOptions()); 36 static RawPtr<ImageBitmap> create(ImageBitmap*, const IntRect&, const ImageB itmapOptions& = ImageBitmapOptions());
37 static PassRefPtrWillBeRawPtr<ImageBitmap> create(PassRefPtr<StaticBitmapIma ge>); 37 static RawPtr<ImageBitmap> create(PassRefPtr<StaticBitmapImage>);
38 static PassRefPtrWillBeRawPtr<ImageBitmap> create(PassRefPtr<StaticBitmapIma ge>, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions()); 38 static RawPtr<ImageBitmap> create(PassRefPtr<StaticBitmapImage>, const IntRe ct&, const ImageBitmapOptions& = ImageBitmapOptions());
39 39
40 StaticBitmapImage* bitmapImage() const { return (m_image) ? m_image.get() : nullptr; } 40 StaticBitmapImage* bitmapImage() const { return (m_image) ? m_image.get() : nullptr; }
41 PassOwnPtr<uint8_t[]> copyBitmapData(); 41 PassOwnPtr<uint8_t[]> copyBitmapData();
42 unsigned long width() const; 42 unsigned long width() const;
43 unsigned long height() const; 43 unsigned long height() const;
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();
(...skipping 26 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698