Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_VIDEO_CAPTURE_SERVICE_H_ | |
| 6 #define SERVICES_VIDEO_CAPTURE_SERVICE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "mojo/public/cpp/bindings/binding_set.h" | |
| 11 #include "services/shell/public/cpp/service.h" | |
| 12 #include "services/video_capture/public/interfaces/video_capture_device_factory. mojom.h" | |
| 13 #include "services/video_capture/video_capture_device_factory_impl.h" | |
| 14 | |
| 15 namespace video_capture { | |
| 16 | |
| 17 // Exposes a single internal instance of VideoCaptureDeviceFactoryImpl | |
| 18 // through a Mojo Shell Service. | |
| 19 class VideoCaptureService | |
| 20 : public shell::Service, | |
| 21 public shell::InterfaceFactory<mojom::VideoCaptureDeviceFactory> { | |
| 22 public: | |
| 23 VideoCaptureService(); | |
| 24 ~VideoCaptureService() override; | |
| 25 | |
| 26 // shell::Service: | |
| 27 bool OnConnect(shell::Connection* connection) override; | |
| 28 | |
| 29 // shell::InterfaceFactory<mojom::VideoCaptureDeviceFactory>: | |
| 30 void Create(const shell::Identity& remote_identity, | |
| 31 mojom::VideoCaptureDeviceFactoryRequest request) override; | |
| 32 | |
| 33 private: | |
| 34 mojo::BindingSet<mojom::VideoCaptureDeviceFactory> bindings_; | |
| 35 std::unique_ptr<VideoCaptureDeviceFactoryImpl> device_factory_; | |
|
mcasas
2016/08/10 15:50:54
const? And make it forward declared.
chfremer
2016/08/10 17:07:27
Done.
| |
| 36 }; | |
| 37 | |
| 38 } // namespace video_capture | |
| 39 | |
| 40 #endif // SERVICES_VIDEO_CAPTURE_SERVICE_H_ | |
| OLD | NEW |