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

Unified Diff: services/video_capture/service.cc

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 side-by-side diff with in-line comments
Download patch
Index: services/video_capture/service.cc
diff --git a/services/video_capture/service.cc b/services/video_capture/service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b4d3e591767edc98d468c95ac4a755ad76c0ab59
--- /dev/null
+++ b/services/video_capture/service.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/video_capture/service.h"
+#include "services/video_capture/video_capture_device_factory_impl.h"
+
+namespace video_capture {
+
+VideoCaptureService::VideoCaptureService()
+ : device_factory_(new VideoCaptureDeviceFactoryImpl()) {}
yzshen1 2016/08/12 17:46:50 It seems you could make this member a VideoCapture
chfremer 2016/08/12 18:32:27 Done.
+
+VideoCaptureService::~VideoCaptureService() = default;
+
+bool VideoCaptureService::OnConnect(shell::Connection* connection) {
+ connection->AddInterface<mojom::VideoCaptureDeviceFactory>(this);
+ return true;
+}
+
+void VideoCaptureService::Create(
+ const shell::Identity& remote_identity,
+ mojom::VideoCaptureDeviceFactoryRequest request) {
+ bindings_.AddBinding(device_factory_.get(), std::move(request));
+}
+
+} // namespace video_capture

Powered by Google App Engine
This is Rietveld 408576698