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

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

Powered by Google App Engine
This is Rietveld 408576698