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

Unified Diff: mojo/application/public/cpp/lib/application_impl.cc

Issue 1423063004: Allow Chrome to bind an Application request from mojo_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@callback
Patch Set: . Created 5 years, 1 month 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 | « mojo/application/public/cpp/application_impl.h ('k') | mojo/runner/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/public/cpp/lib/application_impl.cc
diff --git a/mojo/application/public/cpp/lib/application_impl.cc b/mojo/application/public/cpp/lib/application_impl.cc
index 31da8113af0e10991022655ffdc0df803a6d685b..6d2fb46b4c652ae41c33392a52908568d9abcded 100644
--- a/mojo/application/public/cpp/lib/application_impl.cc
+++ b/mojo/application/public/cpp/lib/application_impl.cc
@@ -86,11 +86,9 @@ scoped_ptr<ApplicationConnection>
return registry.Pass();
}
-void ApplicationImpl::Initialize(ShellPtr shell, const mojo::String& url) {
- shell_ = shell.Pass();
- shell_.set_connection_error_handler([this]() { OnConnectionError(); });
- url_ = url;
- delegate_->Initialize(this);
+void ApplicationImpl::WaitForInitialize() {
+ DCHECK(!shell_.is_bound());
+ binding_.WaitForIncomingMethodCall();
}
void ApplicationImpl::Quit() {
@@ -104,6 +102,13 @@ void ApplicationImpl::Quit() {
}
}
+void ApplicationImpl::Initialize(ShellPtr shell, const mojo::String& url) {
+ shell_ = shell.Pass();
+ shell_.set_connection_error_handler([this]() { OnConnectionError(); });
+ url_ = url;
+ delegate_->Initialize(this);
+}
+
void ApplicationImpl::AcceptConnection(
const String& requestor_url,
InterfaceRequest<ServiceProvider> services,
« no previous file with comments | « mojo/application/public/cpp/application_impl.h ('k') | mojo/runner/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698