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

Unified Diff: mojo/public/cpp/application/application_impl.h

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: fix android Created 5 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 | « mojo/public/cpp/application/BUILD.gn ('k') | mojo/public/cpp/application/application_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/application/application_impl.h
diff --git a/mojo/public/cpp/application/application_impl.h b/mojo/public/cpp/application/application_impl.h
index eb8c48906adcff93c479c56790ea37fdd9f9eb37..b60ca840483f3a17fffabd766278937636e5965a 100644
--- a/mojo/public/cpp/application/application_impl.h
+++ b/mojo/public/cpp/application/application_impl.h
@@ -50,9 +50,10 @@ class ApplicationDelegate;
// app.AddService<BarImpl>(&context);
//
//
-class ApplicationImpl : public InterfaceImpl<Application> {
+class ApplicationImpl : public Application {
public:
- ApplicationImpl(ApplicationDelegate* delegate, ShellPtr shell);
+ ApplicationImpl(ApplicationDelegate* delegate,
+ InterfaceRequest<Application> request);
~ApplicationImpl() override;
Shell* shell() const { return shell_.get(); }
@@ -72,11 +73,16 @@ class ApplicationImpl : public InterfaceImpl<Application> {
ConnectToApplication(application_url)->ConnectToService(ptr);
}
- // Unbind the shell from this application and return its handle.
- ShellPtr UnbindShell();
-
// Application implementation.
- void Initialize(Array<String> args) override;
+ void Initialize(ShellPtr shell, Array<String> args) override;
+
+ // Block until the Application is initialized, if it is not already.
+ void WaitForInitialize();
+
+ // Unbinds the Shell and Application connections. Must be called after
+ // Initialize.
DaveMoore 2015/01/27 00:41:29 Nit: This seems very specific to our test infrastr
jamesr 2015/01/27 00:59:04 You could do this if you wanted to bind to another
+ void UnbindConnections(InterfaceRequest<Application>* application_request,
+ ShellPtr* shell);
// Quits the main run loop for this application.
static void Terminate();
@@ -103,6 +109,7 @@ class ApplicationImpl : public InterfaceImpl<Application> {
ServiceRegistryList incoming_service_registries_;
ServiceRegistryList outgoing_service_registries_;
ApplicationDelegate* delegate_;
+ Binding<Application> binding_;
ShellPtr shell_;
ShellPtrWatcher* shell_watch_;
std::vector<std::string> args_;
« no previous file with comments | « mojo/public/cpp/application/BUILD.gn ('k') | mojo/public/cpp/application/application_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698