Chromium Code Reviews| Index: components/arc/arc_bridge_bootstrap.h |
| diff --git a/components/arc/arc_bridge_bootstrap.h b/components/arc/arc_bridge_bootstrap.h |
| index 918c2c0bba838a31e4fa36bc55ae9c825c10e2c5..91a4f6a1e28a9af49a13134fbdf83e202b4d72e1 100644 |
| --- a/components/arc/arc_bridge_bootstrap.h |
| +++ b/components/arc/arc_bridge_bootstrap.h |
| @@ -10,6 +10,7 @@ |
| #include "base/macros.h" |
| #include "base/sequenced_task_runner.h" |
| #include "base/single_thread_task_runner.h" |
| +#include "components/arc/arc_bridge_service.h" |
| #include "components/arc/common/arc_bridge.mojom.h" |
| namespace arc { |
| @@ -19,10 +20,25 @@ namespace arc { |
| // being available. |
| class ArcBridgeBootstrap { |
| public: |
| + using AbortReason = ArcBridgeService::AbortReason; |
| + |
| class Delegate { |
| public: |
| + // Called when a connection with ARC instance has been established. |
|
Luis Héctor Chávez
2016/07/08 18:01:02
nit: when the connection
Shuhei Takahashi
2016/07/11 08:25:19
Done.
|
| virtual void OnConnectionEstablished( |
| mojom::ArcBridgeInstancePtr instance_ptr) = 0; |
| + |
| + // Called when ARC instance is being aborted due to errors. |
| + // This can happen if it has failed to boot, or it has crashed after boot. |
| + // After this callback is invoked, the ARC instance will be stopped, so |
| + // you do not need to call ArcBridgeBootstrap::Stop() in the callback. |
| + // Note: This callback can be called multiple times before OnStopped() if |
| + // we encounter multiple errors during the process. |
| + virtual void OnAborting(AbortReason reason) = 0; |
| + |
| + // Called when ARC instance has stopped. |
| + // When the ARC instance is being aborted due to errors, OnAborting() is |
| + // called first, then OnStopped() is called once the instance is stopped. |
| virtual void OnStopped() = 0; |
|
Luis Héctor Chávez
2016/07/08 18:01:02
Do you have an example of an instance where OnAbor
Shuhei Takahashi
2016/07/11 08:25:19
It is possible ArcBridgeBootstrap encounters multi
|
| }; |