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

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

Issue 1819063002: Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and update resourceproviderunittest Created 4 years, 9 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/public/cpp/lib/shell_connection.cc ('k') | mojo/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/shell_client.h
diff --git a/mojo/shell/public/cpp/shell_client.h b/mojo/shell/public/cpp/shell_client.h
index d6fca12bed0ba4dc2a8fc5cb31bd86c4dced6765..aff1aac40ed5797f7c6b66462d47ccb49115eec6 100644
--- a/mojo/shell/public/cpp/shell_client.h
+++ b/mojo/shell/public/cpp/shell_client.h
@@ -43,8 +43,13 @@ class ShellClient {
// Called when ShellConnection's ShellClient binding (i.e. the pipe the
// Mojo Shell has to talk to us over) is closed. A shell client may use this
- // as a signal to terminate.
- virtual void ShellConnectionLost();
+ // as a signal to terminate. Return true from this method to tell the
+ // ShellConnection to run its connection lost closure if it has one, false to
+ // prevent it from being run. The default implementation returns true.
+ // When used in conjunction with ApplicationRunner, returning true here quits
+ // the message loop created by ApplicationRunner, which results in the app
+ // quitting.
+ virtual bool ShellConnectionLost();
private:
DISALLOW_COPY_AND_ASSIGN(ShellClient);
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_connection.cc ('k') | mojo/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698