| Index: components/arc/arc_bridge_service.h
|
| diff --git a/components/arc/arc_bridge_service.h b/components/arc/arc_bridge_service.h
|
| index 6e8c885b7f6508e7438e6a5ec457eacd53824a4f..d041cb0a8bab1bfa612ea4b011bea7392bbf7ae6 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() {}
|
| @@ -165,11 +171,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 OnAppChannelClosed();
|
| + void OnInputChannelClosed();
|
| + void OnNotificationsChannelClosed();
|
| + void OnPowerChannelClosed();
|
| + void OnProcessChannelClosed();
|
| + void OnSettingsChannelClosed();
|
|
|
| // Mojo interfaces.
|
| AppInstancePtr app_ptr_;
|
| @@ -189,6 +207,9 @@ class ArcBridgeService : public ArcBridgeHost {
|
| // The current state of the bridge.
|
| ArcBridgeService::State state_;
|
|
|
| + // WeakPtrFactory to use callbacks.
|
| + base::WeakPtrFactory<ArcBridgeService> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ArcBridgeService);
|
| };
|
|
|
|
|