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

Unified Diff: mojo/shell/public/cpp/application_runner.h

Issue 1755423002: Add a test for application lifecycle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@27amtest
Patch Set: . Created 4 years, 10 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/shell/application_manager.cc ('k') | mojo/shell/public/cpp/lib/application_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/application_runner.h
diff --git a/mojo/shell/public/cpp/application_runner.h b/mojo/shell/public/cpp/application_runner.h
index 192d5324142c270577001ac53734b07aea5952ef..3863923e30fd20f56f3263e68c5e3a595a195821 100644
--- a/mojo/shell/public/cpp/application_runner.h
+++ b/mojo/shell/public/cpp/application_runner.h
@@ -12,6 +12,7 @@
namespace mojo {
class ShellClient;
+class ShellConnection;
// A utility for running a chromium based mojo Application. The typical use
// case is to use when writing your MojoMain:
@@ -46,7 +47,14 @@ class ApplicationRunner {
// Calls Run above with |init_base| set to |true|.
MojoResult Run(MojoHandle shell_handle);
+ // Allows the caller to shut down the connection with the shell. After the
+ // shell notices the pipe has closed, it will no longer track an instance of
+ // this application, though this application may continue to run and service
+ // requests from others.
+ void DestroyShellConnection();
+
private:
+ scoped_ptr<ShellConnection> connection_;
scoped_ptr<ShellClient> client_;
// MessageLoop type. TYPE_CUSTOM is default (MessagePumpMojo will be used as
« no previous file with comments | « mojo/shell/application_manager.cc ('k') | mojo/shell/public/cpp/lib/application_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698