Index: mojo/shell/public/cpp/shell_connection.h |
diff --git a/mojo/shell/public/cpp/shell_connection.h b/mojo/shell/public/cpp/shell_connection.h |
index a05f6f136676a5ba022a190215be3b117c22fdc7..3e00cd362c056cb2d1f69f123fb4a2294c43eb07 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); |
}; |