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

Unified Diff: services/shape_detection/face_detection_impl_mac.h

Issue 2528743002: Shape Detection: Implement FaceDetection on Mac as out-of-process service (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: services/shape_detection/face_detection_impl_mac.h
diff --git a/services/shape_detection/face_detection_impl_mac.h b/services/shape_detection/face_detection_impl_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..14ec6917fef1b8287ad81d12ad8cc9b73abe054f
--- /dev/null
+++ b/services/shape_detection/face_detection_impl_mac.h
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_
+#define SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_
+
+#import <QuartzCore/QuartzCore.h>
+
+#include "base/mac/scoped_nsobject.h"
+#include "services/shape_detection/face_detection_impl.h"
+
+namespace shape_detection {
+
+class FaceDetectionImplMac : public FaceDetectionImpl {
+ public:
+ FaceDetectionImplMac();
+ ~FaceDetectionImplMac() override;
+
+ void Detect(mojo::ScopedSharedBufferHandle frame_data,
+ uint32_t width,
+ uint32_t height,
+ blink::mojom::FaceDetectorOptionsPtr options,
+ const FaceDetectionImpl::DetectCallback& callback) override;
+
+ private:
+ base::scoped_nsobject<CIContext> context_;
+ base::scoped_nsobject<CIDetector> detector_;
+ DISALLOW_COPY_AND_ASSIGN(FaceDetectionImplMac);
+};
+
+} // namespace shape_detection
+
+#endif // SERVICES_SHAPE_DETECTION_FACE_DETECTION_IMPL_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698