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

Unified Diff: components/arc/arc_bridge_service.h

Issue 2436763004: More graceful shutdown for ArcSession. (Closed)
Patch Set: Add StopArcInstance Created 4 years, 2 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 | « chrome/browser/policy/policy_browsertest.cc ('k') | components/arc/arc_bridge_service_impl.h » ('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 93f0767d9d8397f5c72ab728a43512e0331956fa..6ab39fa18f8ba01689d059c9617ce57a1b007670 100644
--- a/components/arc/arc_bridge_service.h
+++ b/components/arc/arc_bridge_service.h
@@ -103,11 +103,18 @@ class ArcBridgeService {
// HandleStartup() should be called upon profile startup. This will only
// launch an instance if the instance is enabled.
// This can only be called on the thread that this class was created on.
- virtual void HandleStartup() = 0;
- // Shutdown() should be called when the browser is shutting down. This can
- // only be called on the thread that this class was created on.
- virtual void Shutdown() = 0;
+ // Starts the ARC service, then it will connect the Mojo channel. When the
+ // bridge becomes ready, OnBridgeReady() is called.
+ virtual void RequestStart() = 0;
+
+ // Stops the ARC service.
+ virtual void RequestStop() = 0;
+
+ // OnShutdown() should be called when the browser is shutting down. This can
+ // only be called on the thread that this class was created on. We assume that
+ // when this function is called, MessageLoop is no longer exists.
+ virtual void OnShutdown() = 0;
// Adds or removes observers. This can only be called on the thread that this
// class was created on. RemoveObserver does nothing if |observer| is not in
@@ -244,9 +251,10 @@ class ArcBridgeService {
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, StopMidStartup);
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Restart);
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, OnBridgeStopped);
+ FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Shutdown);
base::ObserverList<Observer> observer_list_;
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | components/arc/arc_bridge_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698