| 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 #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" |
| 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 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |