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

Unified Diff: mash/example/window_type_launcher/window_type_launcher.cc

Issue 2646193002: Replace OnConnect with OnBindInterface in //mash. (Closed)
Patch Set: . Created 3 years, 11 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/example/window_type_launcher/window_type_launcher.h ('k') | mash/quick_launch/quick_launch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/example/window_type_launcher/window_type_launcher.cc
diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc
index e58f93ac0d460940abc49c7b45f3d072d6b2a850..46c07923b15faf7eb4db10c3d06897247a9f6f2f 100644
--- a/mash/example/window_type_launcher/window_type_launcher.cc
+++ b/mash/example/window_type_launcher/window_type_launcher.cc
@@ -434,7 +434,9 @@ class WindowTypeLauncherView : public views::WidgetDelegateView,
} // namespace
-WindowTypeLauncher::WindowTypeLauncher() {}
+WindowTypeLauncher::WindowTypeLauncher() {
+ registry_.AddInterface<mash::mojom::Launchable>(this);
+}
WindowTypeLauncher::~WindowTypeLauncher() {}
void WindowTypeLauncher::RemoveWindow(views::Widget* window) {
@@ -451,11 +453,12 @@ void WindowTypeLauncher::OnStart() {
std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
}
-bool WindowTypeLauncher::OnConnect(
- const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mash::mojom::Launchable>(this);
- return true;
+void WindowTypeLauncher::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 WindowTypeLauncher::Launch(uint32_t what, mash::mojom::LaunchMode how) {
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.h ('k') | mash/quick_launch/quick_launch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698