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

Side by Side Diff: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h

Issue 2420203002: Implement convertToBlob() in OffscreenCanvas (Closed)
Patch Set: rename function name Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 OffscreenCanvasModules_h 5 #ifndef OffscreenCanvasModules_h
6 #define OffscreenCanvasModules_h 6 #define OffscreenCanvasModules_h
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/offscreencanvas/OffscreenCanvas.h" 9 #include "core/offscreencanvas/OffscreenCanvas.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/text/WTFString.h" 12 #include "wtf/text/WTFString.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CanvasContextCreationAttributes; 16 class CanvasContextCreationAttributes;
17 class OffscreenCanvas; 17 class OffscreenCanvas;
18 class OffscreenCanvasRenderingContext2D; 18 class OffscreenCanvasRenderingContext2D;
19 19
20 class MODULES_EXPORT OffscreenCanvasModules { 20 class MODULES_EXPORT OffscreenCanvasModules {
21 STATIC_ONLY(OffscreenCanvasModules) 21 STATIC_ONLY(OffscreenCanvasModules)
22 public: 22 public:
23 static void getContext(ScriptState*, 23 static void getContext(ScriptState*,
24 OffscreenCanvas&, 24 OffscreenCanvas&,
25 const String&, 25 const String&,
26 const CanvasContextCreationAttributes&, 26 const CanvasContextCreationAttributes&,
27 ExceptionState&, 27 ExceptionState&,
28 OffscreenRenderingContext&); 28 OffscreenRenderingContext&);
29
30 static ScriptPromise convertToBlob(ScriptState*,
31 OffscreenCanvas&,
32 const ImageEncodeOptions&,
33 ExceptionState&);
34
35 private:
36 static ImageData* toImageData(OffscreenCanvas&,
37 SourceDrawingBuffer,
38 SnapshotReason);
29 }; 39 };
30 40
31 } // namespace blink 41 } // namespace blink
32 42
33 #endif // OffscreenCanvasModules_h 43 #endif // OffscreenCanvasModules_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698