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

Unified Diff: components/arc/arc_bridge_service.h

Issue 1548833002: arc-bridge: Restart ARC instance on crash (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed more feedback Created 4 years, 11 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 | « components/arc/arc_bridge_bootstrap.cc ('k') | components/arc/arc_bridge_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_bridge_service.h
diff --git a/components/arc/arc_bridge_service.h b/components/arc/arc_bridge_service.h
index 470b1145fafaa11611cfde37d2ff0fa6a60ced69..1f54b7e295dac4f53ad0690422bc9a0b482a46cd 100644
--- a/components/arc/arc_bridge_service.h
+++ b/components/arc/arc_bridge_service.h
@@ -73,23 +73,29 @@ class ArcBridgeService : public ArcBridgeHost {
// Called whenever ARC's availability has changed for this system.
virtual void OnAvailableChanged(bool available) {}
- // Called whenever the ARC app list is ready.
+ // Called whenever the ARC app interface state changes.
virtual void OnAppInstanceReady() {}
+ virtual void OnAppInstanceClosed() {}
- // Called whenever the ARC input is ready.
+ // Called whenever the ARC input interface state changes.
virtual void OnInputInstanceReady() {}
+ virtual void OnInputInstanceClosed() {}
- // Called whenever the ARC notification is ready.
+ // Called whenever the ARC notification interface state changes.
virtual void OnNotificationsInstanceReady() {}
+ virtual void OnNotificationsInstanceClosed() {}
- // Called whenever the ARC power is ready.
+ // Called whenever the ARC power interface state changes.
virtual void OnPowerInstanceReady() {}
+ virtual void OnPowerInstanceClosed() {}
- // Called whenever the ARC process is ready.
+ // Called whenever the ARC process interface state changes.
virtual void OnProcessInstanceReady() {}
+ virtual void OnProcessInstanceClosed() {}
- // Called whenever the ARC settings is ready.
+ // Called whenever the ARC settings interface state changes.
virtual void OnSettingsInstanceReady() {}
+ virtual void OnSettingsInstanceClosed() {}
protected:
virtual ~Observer() {}
@@ -172,11 +178,23 @@ class ArcBridgeService : public ArcBridgeHost {
bool CalledOnValidThread();
+ // Closes all Mojo channels.
+ void CloseAllChannels();
+
private:
friend class ArcBridgeTest;
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic);
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Prerequisites);
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, ShutdownMidStartup);
+ FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Restart);
+
+ // Called when one of the individual channels is closed.
+ void CloseAppChannel();
+ void CloseInputChannel();
+ void CloseNotificationsChannel();
+ void ClosePowerChannel();
+ void CloseProcessChannel();
+ void CloseSettingsChannel();
// Callbacks for QueryVersion.
void OnAppVersionReady(int32_t version);
« no previous file with comments | « components/arc/arc_bridge_bootstrap.cc ('k') | components/arc/arc_bridge_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698