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

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

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to adapt to roll 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
Index: third_party/mojo/src/mojo/public/cpp/application/application_impl.h
diff --git a/third_party/mojo/src/mojo/public/cpp/application/application_impl.h b/third_party/mojo/src/mojo/public/cpp/application/application_impl.h
index 430a1246aca48fd75a22c73fa9902021d070f701..b60ca840483f3a17fffabd766278937636e5965a 100644
--- a/third_party/mojo/src/mojo/public/cpp/application/application_impl.h
+++ b/third_party/mojo/src/mojo/public/cpp/application/application_impl.h
@@ -50,11 +50,10 @@ class ApplicationDelegate;
// app.AddService<BarImpl>(&context);
//
//
-class ApplicationImpl : public InterfaceImpl<Application> {
+class ApplicationImpl : public Application {
public:
ApplicationImpl(ApplicationDelegate* delegate,
- ScopedMessagePipeHandle shell_handle);
- ApplicationImpl(ApplicationDelegate* delegate, MojoHandle shell_handle);
+ InterfaceRequest<Application> request);
~ApplicationImpl() override;
Shell* shell() const { return shell_.get(); }
@@ -74,14 +73,16 @@ class ApplicationImpl : public InterfaceImpl<Application> {
ConnectToApplication(application_url)->ConnectToService(ptr);
}
- // Wait for the ShellPtr's Initialize message.
- bool WaitForInitialize();
+ // Application implementation.
+ void Initialize(ShellPtr shell, Array<String> args) override;
- // Unbind the shell from this application and return its handle.
- ScopedMessagePipeHandle UnbindShell();
+ // Block until the Application is initialized, if it is not already.
+ void WaitForInitialize();
- // Application implementation.
- void Initialize(Array<String> args) override;
+ // Unbinds the Shell and Application connections. Must be called after
+ // Initialize.
+ void UnbindConnections(InterfaceRequest<Application>* application_request,
+ ShellPtr* shell);
// Quits the main run loop for this application.
static void Terminate();
@@ -89,8 +90,8 @@ class ApplicationImpl : public InterfaceImpl<Application> {
private:
class ShellPtrWatcher;
- void BindShell(ScopedMessagePipeHandle shell_handle);
void ClearConnections();
+
void OnShellError() {
ClearConnections();
Terminate();
@@ -108,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_;

Powered by Google App Engine
This is Rietveld 408576698