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

Unified Diff: mojo/shell/external_application_listener_posix.cc

Issue 614663003: Change ExternalApplicationRegistrar::Register API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | mojo/shell/external_application_listener_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/external_application_listener_posix.cc
diff --git a/mojo/shell/external_application_listener_posix.cc b/mojo/shell/external_application_listener_posix.cc
index 42afa25b35ae01b278f25190a90d35cbb8c13454..5d56f06cedb5ff234342b07a946f377b56555f5c 100644
--- a/mojo/shell/external_application_listener_posix.cc
+++ b/mojo/shell/external_application_listener_posix.cc
@@ -55,9 +55,9 @@ class ExternalApplicationListenerPosix::RegistrarImpl
embedder::ChannelInit channel_init;
private:
- virtual void Register(const String& app_url,
- InterfaceRequest<Shell> shell,
- const mojo::Closure& callback) override;
+ virtual void Register(
+ const String& app_url,
+ const mojo::Callback<void(ShellPtr)>& callback) override;
const RegisterCallback register_callback_;
};
@@ -191,10 +191,10 @@ void ExternalApplicationListenerPosix::RegistrarImpl::OnConnectionError() {
void ExternalApplicationListenerPosix::RegistrarImpl::Register(
const String& app_url,
- InterfaceRequest<Shell> shell,
- const mojo::Closure& callback) {
- register_callback_.Run(app_url.To<GURL>(), shell.PassMessagePipe());
- callback.Run();
+ const mojo::Callback<void(ShellPtr)>& callback) {
+ MessagePipe pipe;
+ register_callback_.Run(app_url.To<GURL>(), pipe.handle0.Pass());
+ callback.Run(MakeProxy<Shell>(pipe.handle1.Pass()));
}
} // namespace shell
« no previous file with comments | « no previous file | mojo/shell/external_application_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698