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

Unified Diff: components/arc/arc_bridge_service.h

Issue 2577373002: Refactor ArcBridgeServiceImpl part 2. (Closed)
Patch Set: Rebase Created 4 years 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_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 2607e641efd9e1cdfaa8cf2c0b966c50422b31ad..74abd26f6f0d24160dce0ea7b06699876fa40b30 100644
--- a/components/arc/arc_bridge_service.h
+++ b/components/arc/arc_bridge_service.h
@@ -9,10 +9,8 @@
#include <string>
#include <vector>
-#include "base/files/scoped_file.h"
#include "base/macros.h"
#include "base/observer_list.h"
-#include "base/values.h"
#include "components/arc/arc_session_observer.h"
#include "components/arc/instance_holder.h"
@@ -131,7 +129,7 @@ class ArcBridgeService {
InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; }
// Gets if ARC is currently running.
- bool ready() const { return state() == State::READY; }
+ bool ready() const { return state() == State::RUNNING; }
// Gets if ARC is currently stopped. This is not exactly !ready() since there
// are transient states between ready() and stopped().
@@ -142,34 +140,32 @@ class ArcBridgeService {
// in the following sequence:
//
// STOPPED
- // PrerequisitesChanged() ->
- // CONNECTING
- // OnConnectionEstablished() ->
+ // RequestStart() ->
+ // STARTING
+ // OnSessionReady() ->
// READY
//
// The ArcSession state machine can be thought of being substates of
- // ArcBridgeService's CONNECTING state.
+ // ArcBridgeService's STARTING state.
+ // ArcBridgeService's state machine can be stopped at any phase.
//
// *
- // StopInstance() ->
+ // RequestStop() ->
// STOPPING
- // OnStopped() ->
+ // OnSessionStopped() ->
// STOPPED
enum class State {
- // ARC is not currently running.
+ // ARC instance is not currently running.
STOPPED,
- // The request to connect has been sent.
- CONNECTING,
+ // Request to start ARC instance is received. Starting an ARC instance.
+ STARTING,
- // The instance has started, and the bridge is fully established.
- CONNECTED,
+ // ARC instance has finished initializing, and is now ready for interaction
+ // with other services.
+ RUNNING,
- // The ARC instance has finished initializing and is now ready for user
- // interaction.
- READY,
-
- // The ARC instance has started shutting down.
+ // Request to stop ARC instance is recieved. Stopping the ARC instance.
STOPPING,
};
« no previous file with comments | « no previous file | components/arc/arc_bridge_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698