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

Unified Diff: mash/quick_launch/quick_launch.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/quick_launch/quick_launch.h ('k') | mash/session/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/quick_launch/quick_launch.cc
diff --git a/mash/quick_launch/quick_launch.cc b/mash/quick_launch/quick_launch.cc
index 18cacff1e32e473625a6234ecf3e910a958a1a69..a760cea3260d446eb2a7e573924fe79d01cf9c33 100644
--- a/mash/quick_launch/quick_launch.cc
+++ b/mash/quick_launch/quick_launch.cc
@@ -155,7 +155,9 @@ class QuickLaunchUI : public views::WidgetDelegateView,
DISALLOW_COPY_AND_ASSIGN(QuickLaunchUI);
};
-QuickLaunch::QuickLaunch() {}
+QuickLaunch::QuickLaunch() {
+ registry_.AddInterface<::mash::mojom::Launchable>(this);
+}
QuickLaunch::~QuickLaunch() {}
void QuickLaunch::RemoveWindow(views::Widget* window) {
@@ -176,10 +178,12 @@ void QuickLaunch::OnStart() {
Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW);
}
-bool QuickLaunch::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<::mash::mojom::Launchable>(this);
- return true;
+void QuickLaunch::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 QuickLaunch::Launch(uint32_t what, mojom::LaunchMode how) {
« no previous file with comments | « mash/quick_launch/quick_launch.h ('k') | mash/session/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698