Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: components/arc/arc_bridge_bootstrap.h

Issue 2133653002: arc: Notify ARC instance failures via callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/arc/arc_bridge_bootstrap.cc » ('j') | components/arc/arc_bridge_service.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
};
« no previous file with comments | « no previous file | components/arc/arc_bridge_bootstrap.cc » ('j') | components/arc/arc_bridge_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698