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

Side by Side Diff: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h

Issue 2875243002: RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: RELAND2: ShapeDetection: use mojom::Bitmap for mojo interface. Created 3 years, 6 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 ShapeDetector_h 5 #ifndef ShapeDetector_h
6 #define ShapeDetector_h 6 #define ShapeDetector_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 "core/imagebitmap/ImageBitmapFactories.h" 10 #include "core/imagebitmap/ImageBitmapFactories.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "modules/canvas2d/CanvasRenderingContext2D.h" 12 #include "modules/canvas2d/CanvasRenderingContext2D.h"
13 #include "skia/public/interfaces/bitmap.mojom-blink.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class MODULES_EXPORT ShapeDetector 17 class MODULES_EXPORT ShapeDetector
17 : public GarbageCollectedFinalized<ShapeDetector> { 18 : public GarbageCollectedFinalized<ShapeDetector> {
18 public: 19 public:
19 virtual ~ShapeDetector() = default; 20 virtual ~ShapeDetector() = default;
20 21
21 ScriptPromise detect(ScriptState*, const ImageBitmapSourceUnion&); 22 ScriptPromise detect(ScriptState*, const ImageBitmapSourceUnion&);
22 DEFINE_INLINE_VIRTUAL_TRACE() {} 23 DEFINE_INLINE_VIRTUAL_TRACE() {}
23 24
24 private: 25 private:
25 ScriptPromise DetectShapesOnImageData(ScriptPromiseResolver*, ImageData*); 26 ScriptPromise DetectShapesOnImageData(ScriptPromiseResolver*, ImageData*);
26 ScriptPromise DetectShapesOnImageElement(ScriptPromiseResolver*, 27 ScriptPromise DetectShapesOnImageElement(ScriptPromiseResolver*,
27 const HTMLImageElement*); 28 const HTMLImageElement*);
28 29
29 virtual ScriptPromise DoDetect(ScriptPromiseResolver*, 30 virtual ScriptPromise DoDetect(ScriptPromiseResolver*,
30 mojo::ScopedSharedBufferHandle, 31 skia::mojom::blink::BitmapPtr) = 0;
31 int image_width,
32 int image_height) = 0;
33 }; 32 };
34 33
35 } // namespace blink 34 } // namespace blink
36 35
37 #endif // ShapeDetector_h 36 #endif // ShapeDetector_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698