summaryrefslogtreecommitdiffstats
path: root/mojo/shell/public/cpp/shell_client.h
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2016-03-22 14:44:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-22 21:45:57 +0000
commit340545a9d2c2bf94d93421bbb6bfa40596ae4523 (patch)
tree7e13a15630e87d0c8c0bd19a2bacd1062eebdbbf /mojo/shell/public/cpp/shell_client.h
parent56d49295ef5c22d1fbc71d491494944cf1709bb3 (diff)
downloadchromium_src-340545a9d2c2bf94d93421bbb6bfa40596ae4523.zip
chromium_src-340545a9d2c2bf94d93421bbb6bfa40596ae4523.tar.gz
chromium_src-340545a9d2c2bf94d93421bbb6bfa40596ae4523.tar.bz2
Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used
This was originally at https://codereview.chromium.org/1814223002/ , but Ben is out and I need this for tests, so I'm taking over. BUG=none TEST=covered by tests TBR=ben@chromium.org R=ben@chromium.org Committed: https://crrev.com/a50f9840749052fbdec087a304548217cc6fd00b Cr-Commit-Position: refs/heads/master@{#382389} Review URL: https://codereview.chromium.org/1819063002 Cr-Commit-Position: refs/heads/master@{#382688}
Diffstat (limited to 'mojo/shell/public/cpp/shell_client.h')
-rw-r--r--mojo/shell/public/cpp/shell_client.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/mojo/shell/public/cpp/shell_client.h b/mojo/shell/public/cpp/shell_client.h
index d6fca12..aff1aac 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);