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

Unified Diff: services/video_capture/video_capture_service.cc

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: Merge-in changes from upstream 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 side-by-side diff with in-line comments
Download patch
Index: services/video_capture/video_capture_service.cc
diff --git a/services/video_capture/video_capture_service.cc b/services/video_capture/video_capture_service.cc
index e025b6b4903cf177e072c8f99e100bba4d06b9ac..fb6de619659b7bc4ee3584de9661e86d51afbae3 100644
--- a/services/video_capture/video_capture_service.cc
+++ b/services/video_capture/video_capture_service.cc
@@ -3,23 +3,34 @@
// found in the LICENSE file.
#include "services/video_capture/video_capture_service.h"
+#include "services/video_capture/service_configurator_impl.h"
+#include "services/video_capture/video_capture_device_factory_impl.h"
namespace video_capture {
-VideoCaptureService::VideoCaptureService() = default;
+VideoCaptureService::VideoCaptureService() {
+ device_factory_.reset(new VideoCaptureDeviceFactoryImpl());
+ configurator_.reset(new ServiceConfiguratorImpl(device_factory_.get()));
+}
VideoCaptureService::~VideoCaptureService() = default;
bool VideoCaptureService::OnConnect(const shell::Identity& remote_identity,
shell::InterfaceRegistry* registry) {
+ registry->AddInterface<mojom::ServiceConfigurator>(this);
registry->AddInterface<mojom::VideoCaptureDeviceFactory>(this);
return true;
}
+void VideoCaptureService::Create(const shell::Identity& remote_identity,
+ mojom::ServiceConfiguratorRequest request) {
+ configurator_bindings_.AddBinding(configurator_.get(), std::move(request));
+}
+
void VideoCaptureService::Create(
const shell::Identity& remote_identity,
mojom::VideoCaptureDeviceFactoryRequest request) {
- bindings_.AddBinding(&device_factory_, std::move(request));
+ factory_bindings_.AddBinding(device_factory_.get(), std::move(request));
}
} // namespace video_capture

Powered by Google App Engine
This is Rietveld 408576698