OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOJO_SERVICE_VIDEO_CAPTURE_PROVIDER_
H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOJO_SERVICE_VIDEO_CAPTURE_PROVIDER_
H_ |
| 7 |
| 8 #include "base/threading/thread_checker.h" |
| 9 #include "content/browser/renderer_host/media/video_capture_provider.h" |
| 10 #include "services/video_capture/public/interfaces/device_factory.mojom.h" |
| 11 #include "services/video_capture/public/interfaces/device_factory_provider.mojom
.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 class CONTENT_EXPORT MojoServiceVideoCaptureProvider |
| 16 : public VideoCaptureProvider { |
| 17 public: |
| 18 MojoServiceVideoCaptureProvider(); |
| 19 ~MojoServiceVideoCaptureProvider() override; |
| 20 |
| 21 void Uninitialize() override; |
| 22 |
| 23 void GetDeviceInfosAsync( |
| 24 const base::Callback<void( |
| 25 const std::vector<media::VideoCaptureDeviceInfo>&)>& result_callback) |
| 26 override; |
| 27 |
| 28 std::unique_ptr<VideoCaptureDeviceLauncher> CreateDeviceLauncher() override; |
| 29 |
| 30 private: |
| 31 void LazyConnectToService(); |
| 32 void OnLostConnectionToDeviceFactory(); |
| 33 |
| 34 // We must hold on to |device_factory_provider_| because it holds the |
| 35 // service-side binding for |device_factory_|. |
| 36 video_capture::mojom::DeviceFactoryProviderPtr device_factory_provider_; |
| 37 video_capture::mojom::DeviceFactoryPtr device_factory_; |
| 38 base::ThreadChecker thread_checker_; |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOJO_SERVICE_VIDEO_CAPTURE_PROVID
ER_H_ |
OLD | NEW |