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

Unified Diff: mash/package/mash_packaged_service.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 | « mash/package/mash_packaged_service.h ('k') | media/mojo/services/media_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/package/mash_packaged_service.cc
diff --git a/mash/package/mash_packaged_service.cc b/mash/package/mash_packaged_service.cc
index ea219b2e5aef6e963acaa1f8e89401adae5ca056..b5f45e2df39a47579a9de15170152c30251a2f0d 100644
--- a/mash/package/mash_packaged_service.cc
+++ b/mash/package/mash_packaged_service.cc
@@ -17,7 +17,6 @@
#include "mash/session/session.h"
#include "mash/task_viewer/public/interfaces/constants.mojom.h"
#include "mash/task_viewer/task_viewer.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/public/cpp/service_context.h"
#include "services/ui/ime/test_ime_driver/test_ime_application.h"
#include "services/ui/public/interfaces/constants.mojom.h"
@@ -36,15 +35,18 @@
namespace mash {
-MashPackagedService::MashPackagedService() {}
+MashPackagedService::MashPackagedService() {
+ registry_.AddInterface<ServiceFactory>(this);
+}
MashPackagedService::~MashPackagedService() {}
-bool MashPackagedService::OnConnect(
- const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<ServiceFactory>(this);
- return true;
+void MashPackagedService::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 MashPackagedService::Create(
« no previous file with comments | « mash/package/mash_packaged_service.h ('k') | media/mojo/services/media_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698