Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Side by Side Diff: services/video_capture/video_capture_service.h

Issue 2244763002: Video Capture Mojo (1.4a.a): Add service configurator interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@MakeService
Patch Set: Split out rename to separate CL Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_SERVICE_H_ 5 #ifndef SERVICES_VIDEO_CAPTURE_SERVICE_H_
6 #define SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_SERVICE_H_ 6 #define SERVICES_VIDEO_CAPTURE_SERVICE_H_
yzshen1 2016/08/16 17:55:08 Please match file path exactly.
chfremer 2016/08/16 18:34:41 Done.
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "mojo/public/cpp/bindings/binding_set.h" 10 #include "mojo/public/cpp/bindings/binding_set.h"
11 #include "services/shell/public/cpp/service.h" 11 #include "services/shell/public/cpp/service.h"
12 #include "services/video_capture/public/interfaces/video_capture_device_factory. mojom.h" 12 #include "services/video_capture/public/interfaces/video_capture_service.mojom.h "
13 #include "services/video_capture/video_capture_device_factory_impl.h"
14 13
15 namespace video_capture { 14 namespace video_capture {
16 15
17 // Exposes a single internal instance of VideoCaptureDeviceFactoryImpl 16 class VideoCaptureDeviceFactoryImpl;
18 // through a Mojo Shell Service. 17 class FakeVideoCaptureDeviceFactoryConfiguratorImpl;
18
19 // Implementation of mojom::VideoCaptureService as a Mojo Shell Service.
19 class VideoCaptureService 20 class VideoCaptureService
20 : public shell::Service, 21 : public shell::Service,
21 public shell::InterfaceFactory<mojom::VideoCaptureDeviceFactory> { 22 public shell::InterfaceFactory<mojom::VideoCaptureService>,
23 public mojom::VideoCaptureService {
22 public: 24 public:
23 VideoCaptureService(); 25 VideoCaptureService();
24 ~VideoCaptureService() override; 26 ~VideoCaptureService() override;
25 27
26 // shell::Service: 28 // shell::Service:
27 bool OnConnect(const shell::Identity& remote_identity, 29 bool OnConnect(const shell::Identity& remote_identity,
28 shell::InterfaceRegistry* registry) override; 30 shell::InterfaceRegistry* registry) override;
29 31
30 // shell::InterfaceFactory<mojom::VideoCaptureDeviceFactory>: 32 // shell::InterfaceFactory<mojom::VideoCaptureService>:
31 void Create(const shell::Identity& remote_identity, 33 void Create(const shell::Identity& remote_identity,
32 mojom::VideoCaptureDeviceFactoryRequest request) override; 34 mojom::VideoCaptureServiceRequest request) override;
35
36 // mojom::VideoCaptureService
37 void ConnectToDeviceFactory(
38 mojom::VideoCaptureDeviceFactoryRequest request) override;
39 void ConnectToFakeDeviceFactory(
40 mojom::VideoCaptureDeviceFactoryRequest request) override;
41 void ConnectToFakeDeviceFactoryConfigurator(
42 mojom::FakeVideoCaptureDeviceFactoryConfiguratorRequest request) override;
33 43
34 private: 44 private:
35 mojo::BindingSet<mojom::VideoCaptureDeviceFactory> bindings_; 45 mojo::BindingSet<mojom::VideoCaptureService> bindings_;
36 VideoCaptureDeviceFactoryImpl device_factory_; 46 mojo::BindingSet<mojom::VideoCaptureDeviceFactory> factory_bindings_;
47 mojo::BindingSet<mojom::VideoCaptureDeviceFactory> fake_factory_bindings_;
48 mojo::BindingSet<mojom::FakeVideoCaptureDeviceFactoryConfigurator>
49 configurator_bindings_;
50 std::unique_ptr<VideoCaptureDeviceFactoryImpl> device_factory_;
51 std::unique_ptr<VideoCaptureDeviceFactoryImpl> fake_device_factory_;
52 std::unique_ptr<FakeVideoCaptureDeviceFactoryConfiguratorImpl> configurator_;
37 }; 53 };
38 54
39 } // namespace video_capture 55 } // namespace video_capture
40 56
41 #endif // SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_SERVICE_H_ 57 #endif // SERVICES_VIDEO_CAPTURE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698