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

Side by Side Diff: services/shape_detection/face_detection_impl_mac.mm

Issue 2667283006: Mac QICRCodeFeature: forward declare in base/mac/sdk_forward_declarations.h (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « services/shape_detection/face_detection_impl_mac.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "services/shape_detection/face_detection_impl_mac.h" 5 #include "services/shape_detection/face_detection_impl_mac.h"
6 6
7 #import <QuartzCore/QuartzCore.h>
8
7 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
8 #include "media/capture/video/scoped_result_callback.h" 10 #include "media/capture/video/scoped_result_callback.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
10 #include "services/shape_detection/detection_utils_mac.h" 12 #include "services/shape_detection/detection_utils_mac.h"
Nico 2017/02/03 19:25:45 do you need to include forward_declarations here?
mcasas 2017/02/03 21:04:16 I don't: Face detection was fully available in 10.
11 #include "services/shape_detection/face_detection_provider_impl.h" 13 #include "services/shape_detection/face_detection_provider_impl.h"
12 14
13 namespace shape_detection { 15 namespace shape_detection {
14 16
15 namespace { 17 namespace {
16 18
17 void RunCallbackWithFaces( 19 void RunCallbackWithFaces(
18 const shape_detection::mojom::FaceDetection::DetectCallback& callback, 20 const shape_detection::mojom::FaceDetection::DetectCallback& callback,
19 shape_detection::mojom::FaceDetectionResultPtr faces) { 21 shape_detection::mojom::FaceDetectionResultPtr faces) {
20 callback.Run(std::move(faces)); 22 callback.Run(std::move(faces));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // We need to adjust |y| coordinate of bounding box before sending it. 70 // We need to adjust |y| coordinate of bounding box before sending it.
69 gfx::RectF boundingbox(f.bounds.origin.x, 71 gfx::RectF boundingbox(f.bounds.origin.x,
70 height - f.bounds.origin.y - f.bounds.size.height, 72 height - f.bounds.origin.y - f.bounds.size.height,
71 f.bounds.size.width, f.bounds.size.height); 73 f.bounds.size.width, f.bounds.size.height);
72 faces->bounding_boxes.push_back(boundingbox); 74 faces->bounding_boxes.push_back(boundingbox);
73 } 75 }
74 scoped_callback.Run(std::move(faces)); 76 scoped_callback.Run(std::move(faces));
75 } 77 }
76 78
77 } // namespace shape_detection 79 } // namespace shape_detection
OLDNEW
« no previous file with comments | « services/shape_detection/face_detection_impl_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698