| 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/video_capture_service.h" | 5 #include "services/video_capture/video_capture_service.h" |
| 6 | 6 |
| 7 #include "media/capture/video/fake_video_capture_device.h" | 7 #include "media/capture/video/fake_video_capture_device.h" |
| 8 #include "media/capture/video/video_capture_jpeg_decoder.h" | 8 #include "media/capture/video/video_capture_jpeg_decoder.h" |
| 9 #include "services/service_manager/public/cpp/interface_registry.h" |
| 9 #include "services/video_capture/video_capture_device_factory_impl.h" | 10 #include "services/video_capture/video_capture_device_factory_impl.h" |
| 10 | 11 |
| 11 namespace { | 12 namespace { |
| 12 static const char kFakeDeviceDisplayName[] = "Fake Video Capture Device"; | 13 static const char kFakeDeviceDisplayName[] = "Fake Video Capture Device"; |
| 13 static const char kFakeDeviceId[] = "FakeDeviceId"; | 14 static const char kFakeDeviceId[] = "FakeDeviceId"; |
| 14 static const char kFakeModelId[] = "FakeModelId"; | 15 static const char kFakeModelId[] = "FakeModelId"; |
| 15 static const float kFakeCaptureDefaultFrameRate = 20.0f; | 16 static const float kFakeCaptureDefaultFrameRate = 20.0f; |
| 16 | 17 |
| 17 // TODO(chfremer): Replace with an actual decoder factory. | 18 // TODO(chfremer): Replace with an actual decoder factory. |
| 18 // https://crbug.com/584797 | 19 // https://crbug.com/584797 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 98 } |
| 98 | 99 |
| 99 void VideoCaptureService::LazyInitializeMockDeviceFactory() { | 100 void VideoCaptureService::LazyInitializeMockDeviceFactory() { |
| 100 if (mock_device_factory_) | 101 if (mock_device_factory_) |
| 101 return; | 102 return; |
| 102 mock_device_factory_ = base::MakeUnique<VideoCaptureDeviceFactoryImpl>( | 103 mock_device_factory_ = base::MakeUnique<VideoCaptureDeviceFactoryImpl>( |
| 103 base::Bind(CreateJpegDecoder)); | 104 base::Bind(CreateJpegDecoder)); |
| 104 } | 105 } |
| 105 | 106 |
| 106 } // namespace video_capture | 107 } // namespace video_capture |
| OLD | NEW |