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

Unified Diff: mash/browser/browser.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/browser/browser.h ('k') | mash/catalog_viewer/catalog_viewer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/browser/browser.cc
diff --git a/mash/browser/browser.cc b/mash/browser/browser.cc
index 840d9174ddfbd691a03c43747c3b4467d0f474db..a88fbd2d64e0dd6df427b5de03a39f83a5433d41 100644
--- a/mash/browser/browser.cc
+++ b/mash/browser/browser.cc
@@ -857,7 +857,9 @@ class UI : public views::WidgetDelegateView,
DISALLOW_COPY_AND_ASSIGN(UI);
};
-Browser::Browser() {}
+Browser::Browser() {
+ registry_.AddInterface<mojom::Launchable>(this);
+}
Browser::~Browser() {}
void Browser::AddWindow(views::Widget* window) {
@@ -887,10 +889,11 @@ void Browser::OnStart() {
std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
}
-bool Browser::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mojom::Launchable>(this);
- return true;
+void Browser::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 Browser::Launch(uint32_t what, mojom::LaunchMode how) {
« no previous file with comments | « mash/browser/browser.h ('k') | mash/catalog_viewer/catalog_viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698