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

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

Issue 2224103002: Package video capture skeleton as Mojo Shell Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@VideoMojoSkeleton2
Patch Set: mcasas' comments 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
(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_
yzshen1 2016/08/12 17:46:50 Please make the file name reflect the class name (
chfremer 2016/08/12 22:23:24 Done.
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
14 namespace video_capture {
15
16 class VideoCaptureDeviceFactoryImpl;
17
18 // Exposes a single internal instance of VideoCaptureDeviceFactoryImpl
19 // through a Mojo Shell Service.
20 class VideoCaptureService
21 : public shell::Service,
22 public shell::InterfaceFactory<mojom::VideoCaptureDeviceFactory> {
23 public:
24 VideoCaptureService();
25 ~VideoCaptureService() override;
26
27 // shell::Service:
28 bool OnConnect(shell::Connection* connection) override;
29
30 // shell::InterfaceFactory<mojom::VideoCaptureDeviceFactory>:
31 void Create(const shell::Identity& remote_identity,
32 mojom::VideoCaptureDeviceFactoryRequest request) override;
33
34 private:
35 mojo::BindingSet<mojom::VideoCaptureDeviceFactory> bindings_;
36 const std::unique_ptr<VideoCaptureDeviceFactoryImpl> device_factory_;
37 };
38
39 } // namespace video_capture
40
41 #endif // SERVICES_VIDEO_CAPTURE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698