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

Unified Diff: components/arc/arc_bridge_bootstrap.h

Issue 2425753002: Rename ArcBridgeBootstrap to ArcSession. (Closed)
Patch Set: Address comment. 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 | « components/arc/BUILD.gn ('k') | components/arc/arc_bridge_bootstrap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_bridge_bootstrap.h
diff --git a/components/arc/arc_bridge_bootstrap.h b/components/arc/arc_bridge_bootstrap.h
deleted file mode 100644
index c9f6dd7b717df6df06027e86b97e8fb2343e82f4..0000000000000000000000000000000000000000
--- a/components/arc/arc_bridge_bootstrap.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_ARC_ARC_BRIDGE_BOOTSTRAP_H_
-#define COMPONENTS_ARC_ARC_BRIDGE_BOOTSTRAP_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "base/sequenced_task_runner.h"
-#include "base/single_thread_task_runner.h"
-#include "components/arc/arc_bridge_service.h"
-
-namespace arc {
-
-// Starts the ARC instance and bootstraps the bridge connection.
-// Clients should implement the Delegate to be notified upon communications
-// being available.
-// The instance can be safely removed 1) before Start() is called, or 2) after
-// OnStopped() is called.
-// The number of instances must be at most one. Otherwise, ARC instances will
-// conflict.
-// TODO(hidehiko): This class manages more than "bootstrap" procedure now.
-// Rename this to ArcSession.
-class ArcBridgeBootstrap {
- 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 ArcBridgeBootstrap.
- static std::unique_ptr<ArcBridgeBootstrap> Create();
- virtual ~ArcBridgeBootstrap();
-
- // Starts and bootstraps a connection with the instance. The Delegate's
- // OnConnectionEstablished() will be called if the bootstrapping is
- // successful, or OnStopped() if it is not.
- // Start() should not be called twice or more.
- virtual void Start() = 0;
-
- // Requests to stop the currently-running instance.
- // The completion is notified via OnStopped() of the Delegate.
- virtual void Stop() = 0;
-
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
- protected:
- ArcBridgeBootstrap();
-
- base::ObserverList<Observer> observer_list_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ArcBridgeBootstrap);
-};
-
-} // namespace arc
-
-#endif // COMPONENTS_ARC_ARC_BRIDGE_BOOTSTRAP_H_
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/arc_bridge_bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698