Index: components/arc/arc_bridge_service.h |
diff --git a/components/arc/arc_bridge_service.h b/components/arc/arc_bridge_service.h |
index 3d719694314ee0219463b873144255e23136cbde..0dd1fd44c64680716c5940a28d0b40ffae752a1d 100644 |
--- a/components/arc/arc_bridge_service.h |
+++ b/components/arc/arc_bridge_service.h |
@@ -21,8 +21,6 @@ class CommandLine; |
namespace arc { |
-class ArcBridgeBootstrap; |
- |
// The Chrome-side service that handles ARC instances and ARC bridge creation. |
// This service handles the lifetime of ARC instances and sets up the |
// communication channel (the ARC bridge) used to send and receive messages. |
@@ -63,13 +61,34 @@ class ArcBridgeService : public mojom::ArcBridgeHost { |
STOPPING, |
}; |
+ // Describes the reason the bridge is being aborted. |
+ enum class AbortReason { |
+ // ARC instance boot failed for unknown errors. |
Luis Héctor Chávez
2016/07/08 18:01:02
nit: it's better to say that this is just any erro
Shuhei Takahashi
2016/07/11 08:25:19
Thanks, I've updated the comment. Does it look goo
Luis Héctor Chávez
2016/07/11 22:28:50
It does, thanks!
|
+ GENERIC_BOOT_FAILURE, |
+ |
+ // ARC instance has crashed. |
+ CRASH, |
+ }; |
+ |
// Notifies life cycle events of ArcBridgeService. |
class Observer { |
public: |
// Called whenever the state of the bridge has changed. |
// TODO(lchavez): Rename to OnStateChangedForTest |
virtual void OnStateChanged(State state) {} |
+ |
+ // Called whenever the bridge got ready. |
Luis Héctor Chávez
2016/07/08 18:01:02
nit: the bridge is ready.
Shuhei Takahashi
2016/07/11 08:25:19
Done.
|
virtual void OnBridgeReady() {} |
+ |
+ // Called whenever the bridge is being aborted due to errors. |
+ // After this callback is invoked, the ARC instance will be stopped, so |
+ // you do not need to call ArcBridgeServiceImpl::StopInstance() in the |
+ // callback. |
+ virtual void OnBridgeAborting(AbortReason reason) {} |
+ |
+ // Called whenever the bridge stopped. |
Luis Héctor Chávez
2016/07/08 18:01:02
nit: the bridge is stopped.
Shuhei Takahashi
2016/07/11 08:25:19
Done.
|
+ // When the bridge aborted due to errors, OnBridgeAborting() is called |
+ // first, then OnBridgeStopped() is called once the instance is stopped. |
virtual void OnBridgeStopped() {} |
// Called whenever ARC's availability has changed for this system. |