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

Side by Side Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapSource.h

Issue 2035113002: Implement ImageBitmapOptions resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 ImageBitmapSource_h 5 #ifndef ImageBitmapSource_h
6 #define ImageBitmapSource_h 6 #define ImageBitmapSource_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
11 #include "core/CoreExport.h" 11 #include "core/CoreExport.h"
12 #include "core/dom/ExceptionCode.h" 12 #include "core/dom/ExceptionCode.h"
13 #include "platform/geometry/IntRect.h"
13 #include "platform/geometry/IntSize.h" 14 #include "platform/geometry/IntSize.h"
15 #include "third_party/WebKit/Source/wtf/Optional.h"
14 16
15 namespace blink { 17 namespace blink {
16 18
17 class ImageBitmap; 19 class ImageBitmap;
18 class ImageBitmapOptions; 20 class ImageBitmapOptions;
19 21
20 class CORE_EXPORT ImageBitmapSource { 22 class CORE_EXPORT ImageBitmapSource {
21 public: 23 public:
22 virtual IntSize bitmapSourceSize() const { return IntSize(); } 24 virtual IntSize bitmapSourceSize() const { return IntSize(); }
23 virtual ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&); 25 virtual ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Optional <IntRect>, const ImageBitmapOptions&, ExceptionState&);
24 26
25 virtual bool isBlob() const { return false; } 27 virtual bool isBlob() const { return false; }
26 28
27 static ScriptPromise fulfillImageBitmap(ScriptState*, ImageBitmap*); 29 static ScriptPromise fulfillImageBitmap(ScriptState*, ImageBitmap*);
28 protected: 30 protected:
29 virtual ~ImageBitmapSource() {} 31 virtual ~ImageBitmapSource() {}
30 }; 32 };
31 33
32 } // namespace blink 34 } // namespace blink
33 35
34 #endif 36 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698