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

Unified Diff: ash/touch_hud/mus/touch_hud_application.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 | « ash/touch_hud/mus/touch_hud_application.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch_hud/mus/touch_hud_application.cc
diff --git a/ash/touch_hud/mus/touch_hud_application.cc b/ash/touch_hud/mus/touch_hud_application.cc
index 2aab640dccf23adbc90b450d826336c9a4987d45..aaa9f3a553f2bdf0698d36437d691c48ba3c5a6f 100644
--- a/ash/touch_hud/mus/touch_hud_application.cc
+++ b/ash/touch_hud/mus/touch_hud_application.cc
@@ -10,7 +10,6 @@
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "services/service_manager/public/cpp/connector.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/public/cpp/service_context.h"
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/window_manager_constants.mojom.h"
@@ -62,7 +61,9 @@ class TouchHudUI : public views::WidgetDelegateView,
DISALLOW_COPY_AND_ASSIGN(TouchHudUI);
};
-TouchHudApplication::TouchHudApplication() : binding_(this) {}
+TouchHudApplication::TouchHudApplication() : binding_(this) {
+ registry_.AddInterface<mash::mojom::Launchable>(this);
+}
TouchHudApplication::~TouchHudApplication() {}
void TouchHudApplication::OnStart() {
@@ -71,11 +72,12 @@ void TouchHudApplication::OnStart() {
std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
}
-bool TouchHudApplication::OnConnect(
- const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mash::mojom::Launchable>(this);
- return true;
+void TouchHudApplication::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 TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) {
« no previous file with comments | « ash/touch_hud/mus/touch_hud_application.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698