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

Unified Diff: components/arc/arc_session.h

Issue 2567083002: Migrate ArcBridgeService::Observer and ArcSession::Observer. (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 | « components/arc/arc_bridge_service_unittest.cc ('k') | components/arc/arc_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_session.h
diff --git a/components/arc/arc_session.h b/components/arc/arc_session.h
index e39b43d729d37035ac611d95b9156216b1e9404e..25aeede5de523d4a4dac0010b85be5fcbd3d2cf0 100644
--- a/components/arc/arc_session.h
+++ b/components/arc/arc_session.h
@@ -17,6 +17,8 @@
namespace arc {
+class ArcSessionObserver;
+
// Starts the ARC instance and bootstraps the bridge connection.
// Clients should implement the Delegate to be notified upon communications
// being available.
@@ -26,22 +28,6 @@ namespace arc {
// conflict.
class ArcSession {
public:
- class Observer {
- public:
- Observer() = default;
- virtual ~Observer() = default;
-
- // Called when the connection with ARC instance has been established.
- virtual void OnReady() = 0;
-
- // Called when ARC instance is stopped. This is called exactly once
- // per instance which is Start()ed.
- virtual void OnStopped(ArcBridgeService::StopReason reason) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Observer);
- };
-
// Creates a default instance of ArcSession.
static std::unique_ptr<ArcSession> Create(
ArcBridgeService* arc_bridge_service,
@@ -61,13 +47,13 @@ class ArcSession {
// loop is already stopped, and the instance will soon be deleted.
virtual void OnShutdown() = 0;
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
+ void AddObserver(ArcSessionObserver* observer);
+ void RemoveObserver(ArcSessionObserver* observer);
protected:
ArcSession();
- base::ObserverList<Observer> observer_list_;
+ base::ObserverList<ArcSessionObserver> observer_list_;
private:
DISALLOW_COPY_AND_ASSIGN(ArcSession);
« no previous file with comments | « components/arc/arc_bridge_service_unittest.cc ('k') | components/arc/arc_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698