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

Unified Diff: ash/autoclick/mus/autoclick_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/autoclick/mus/autoclick_application.h ('k') | ash/common/mojo_interface_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/autoclick/mus/autoclick_application.cc
diff --git a/ash/autoclick/mus/autoclick_application.cc b/ash/autoclick/mus/autoclick_application.cc
index f49a0476c00f33b4e752ef79cb41cbefccf92a08..f38b6a76dc09d2a29c7e4942c9522dc831c7485a 100644
--- a/ash/autoclick/mus/autoclick_application.cc
+++ b/ash/autoclick/mus/autoclick_application.cc
@@ -78,7 +78,10 @@ class AutoclickUI : public views::WidgetDelegateView,
};
AutoclickApplication::AutoclickApplication()
- : launchable_binding_(this), autoclick_binding_(this) {}
+ : launchable_binding_(this), autoclick_binding_(this) {
+ registry_.AddInterface<mash::mojom::Launchable>(this);
+ registry_.AddInterface<mojom::AutoclickController>(this);
+}
AutoclickApplication::~AutoclickApplication() {}
@@ -90,12 +93,12 @@ void AutoclickApplication::OnStart() {
base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this));
}
-bool AutoclickApplication::OnConnect(
+void AutoclickApplication::OnBindInterface(
const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mash::mojom::Launchable>(this);
- registry->AddInterface<mojom::AutoclickController>(this);
- return true;
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ registry_.BindInterface(remote_info.identity, interface_name,
+ std::move(interface_pipe));
}
void AutoclickApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) {
« no previous file with comments | « ash/autoclick/mus/autoclick_application.h ('k') | ash/common/mojo_interface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698