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

Unified Diff: services/video_capture/service_impl.cc

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « services/video_capture/service_impl.h ('k') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/service_impl.cc
diff --git a/services/video_capture/service_impl.cc b/services/video_capture/service_impl.cc
index a1fc4336f06fcdc37c79b9a7b444bc8edde73184..bd3d05017daf7284a88fa24e79f4bd23b9ae6352 100644
--- a/services/video_capture/service_impl.cc
+++ b/services/video_capture/service_impl.cc
@@ -10,7 +10,7 @@
#include "media/capture/video/video_capture_buffer_pool.h"
#include "media/capture/video/video_capture_buffer_tracker.h"
#include "media/capture/video/video_capture_jpeg_decoder.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
+#include "services/service_manager/public/cpp/service_info.h"
#include "services/video_capture/device_factory_media_to_mojo_adapter.h"
namespace {
@@ -25,14 +25,18 @@ std::unique_ptr<media::VideoCaptureJpegDecoder> CreateJpegDecoder() {
namespace video_capture {
-ServiceImpl::ServiceImpl() = default;
+ServiceImpl::ServiceImpl() {
+ registry_.AddInterface<mojom::Service>(this);
+}
ServiceImpl::~ServiceImpl() = default;
-bool ServiceImpl::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mojom::Service>(this);
- return true;
+void ServiceImpl::OnBindInterface(
+ const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
void ServiceImpl::Create(const service_manager::Identity& remote_identity,
« no previous file with comments | « services/video_capture/service_impl.h ('k') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698