diff options
Diffstat (limited to 'mojo/shell/public/cpp/shell_connection.h')
-rw-r--r-- | mojo/shell/public/cpp/shell_connection.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mojo/shell/public/cpp/shell_connection.h b/mojo/shell/public/cpp/shell_connection.h index a05f6f1..3e00cd3 100644 --- a/mojo/shell/public/cpp/shell_connection.h +++ b/mojo/shell/public/cpp/shell_connection.h @@ -61,7 +61,12 @@ class ShellConnection : public shell::mojom::ShellClient { // TODO(rockot): Remove this once we get rid of app tests. void SetAppTestConnectorForTesting(shell::mojom::ConnectorPtr connector); - private: + // Specify a function to be called when the connection to the shell is lost. + void set_connection_lost_closure(const base::Closure& closure) { + connection_lost_closure_ = closure; + } + +private: // shell::mojom::ShellClient: void Initialize(shell::mojom::IdentityPtr identity, uint32_t id, @@ -90,6 +95,8 @@ class ShellConnection : public shell::mojom::ShellClient { Binding<shell::mojom::ShellClient> binding_; scoped_ptr<Connector> connector_; + base::Closure connection_lost_closure_; + DISALLOW_COPY_AND_ASSIGN(ShellConnection); }; |