OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_ | 5 #ifndef SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_ |
6 #define SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_ | 6 #define SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_ |
7 | 7 |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "services/shape_detection/public/interfaces/facedetection.mojom.h" | 9 #include "services/shape_detection/public/interfaces/facedetection.mojom.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" |
10 | 11 |
11 @class CIDetector; | 12 @class CIDetector; |
12 | 13 |
13 namespace shape_detection { | 14 namespace shape_detection { |
14 | 15 |
15 class FaceDetectionImplMac : public shape_detection::mojom::FaceDetection { | 16 class FaceDetectionImplMac : public shape_detection::mojom::FaceDetection { |
16 public: | 17 public: |
17 explicit FaceDetectionImplMac( | 18 explicit FaceDetectionImplMac( |
18 shape_detection::mojom::FaceDetectorOptionsPtr options); | 19 shape_detection::mojom::FaceDetectorOptionsPtr options); |
19 ~FaceDetectionImplMac() override; | 20 ~FaceDetectionImplMac() override; |
20 | 21 |
21 void Detect(mojo::ScopedSharedBufferHandle frame_data, | 22 void Detect(const SkBitmap& bitmap, |
22 uint32_t width, | |
23 uint32_t height, | |
24 const shape_detection::mojom::FaceDetection::DetectCallback& | 23 const shape_detection::mojom::FaceDetection::DetectCallback& |
25 callback) override; | 24 callback) override; |
26 | 25 |
27 private: | 26 private: |
28 base::scoped_nsobject<CIDetector> detector_; | 27 base::scoped_nsobject<CIDetector> detector_; |
29 | 28 |
30 DISALLOW_COPY_AND_ASSIGN(FaceDetectionImplMac); | 29 DISALLOW_COPY_AND_ASSIGN(FaceDetectionImplMac); |
31 }; | 30 }; |
32 | 31 |
33 } // namespace shape_detection | 32 } // namespace shape_detection |
34 | 33 |
35 #endif // SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_ | 34 #endif // SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_ |
OLD | NEW |