OLD | NEW |
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 #include "services/video_capture/device_factory_media_to_mojo_adapter.h" | 5 #include "services/video_capture/device_factory_media_to_mojo_adapter.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/stl_util.h" |
11 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
12 #include "media/capture/video/fake_video_capture_device.h" | 13 #include "media/capture/video/fake_video_capture_device.h" |
13 #include "mojo/public/cpp/bindings/strong_binding.h" | 14 #include "mojo/public/cpp/bindings/strong_binding.h" |
14 #include "services/video_capture/device_media_to_mojo_adapter.h" | 15 #include "services/video_capture/device_media_to_mojo_adapter.h" |
15 #include "services/video_capture/public/cpp/capture_settings.h" | 16 #include "services/video_capture/public/cpp/capture_settings.h" |
16 | 17 |
17 namespace video_capture { | 18 namespace video_capture { |
18 | 19 |
19 DeviceFactoryMediaToMojoAdapter::ActiveDeviceEntry::ActiveDeviceEntry() = | 20 DeviceFactoryMediaToMojoAdapter::ActiveDeviceEntry::ActiveDeviceEntry() = |
20 default; | 21 default; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 [&device_id](const media::VideoCaptureDeviceDescriptor& descriptor) { | 134 [&device_id](const media::VideoCaptureDeviceDescriptor& descriptor) { |
134 return descriptor.device_id == device_id; | 135 return descriptor.device_id == device_id; |
135 }); | 136 }); |
136 if (descriptor_iter == descriptors.end()) | 137 if (descriptor_iter == descriptors.end()) |
137 return false; | 138 return false; |
138 *descriptor = *descriptor_iter; | 139 *descriptor = *descriptor_iter; |
139 return true; | 140 return true; |
140 } | 141 } |
141 | 142 |
142 } // namespace video_capture | 143 } // namespace video_capture |
OLD | NEW |