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

Unified Diff: components/arc/arc_service_manager.h

Issue 2538263005: Simplify ArcServiceManager by stop deriving it from ArcIntentHelperObserver (Closed)
Patch Set: Address comment 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 | « chrome/browser/chromeos/arc/arc_service_launcher.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_service_manager.h
diff --git a/components/arc/arc_service_manager.h b/components/arc/arc_service_manager.h
index dac67e90d86e52aec755bbf31084e1f9e716c57b..07cb10e635d84fd4ade99eff3fc813694f315503 100644
--- a/components/arc/arc_service_manager.h
+++ b/components/arc/arc_service_manager.h
@@ -14,17 +14,17 @@
#include "base/task_runner.h"
#include "base/threading/thread_checker.h"
#include "components/arc/intent_helper/activity_icon_loader.h"
-#include "components/arc/intent_helper/arc_intent_helper_observer.h"
#include "components/arc/intent_helper/local_activity_resolver.h"
namespace arc {
class ArcBridgeService;
+class ArcIntentHelperObserver;
class ArcService;
// Manages creation and destruction of services that communicate with the ARC
// instance via the ArcBridgeService.
-class ArcServiceManager : public arc::ArcIntentHelperObserver {
+class ArcServiceManager {
public:
class Observer {
public:
@@ -37,7 +37,7 @@ class ArcServiceManager : public arc::ArcIntentHelperObserver {
explicit ArcServiceManager(
scoped_refptr<base::TaskRunner> blocking_task_runner);
- ~ArcServiceManager() override;
+ ~ArcServiceManager();
// |arc_bridge_service| can only be accessed on the thread that this
// class was created on.
@@ -56,9 +56,6 @@ class ArcServiceManager : public arc::ArcIntentHelperObserver {
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
- // arc::ArcIntentHelperObserver overrides.
- void OnAppsUpdated() override;
-
// Called to shut down all ARC services.
void Shutdown();
@@ -79,10 +76,20 @@ class ArcServiceManager : public arc::ArcIntentHelperObserver {
return activity_resolver_;
}
+ // Returns the IntentHelperObserver instance owned by ArcServiceManager.
+ ArcIntentHelperObserver* intent_helper_observer() {
+ return intent_helper_observer_.get();
+ }
+
private:
+ class IntentHelperObserverImpl; // implemented in arc_service_manager.cc.
+
base::ThreadChecker thread_checker_;
scoped_refptr<base::TaskRunner> blocking_task_runner_;
+ // An object for observing the ArcIntentHelper instance in |services_|.
+ std::unique_ptr<ArcIntentHelperObserver> intent_helper_observer_;
+
std::unique_ptr<ArcBridgeService> arc_bridge_service_;
std::vector<std::unique_ptr<ArcService>> services_;
scoped_refptr<ActivityIconLoader> icon_loader_;
« no previous file with comments | « chrome/browser/chromeos/arc/arc_service_launcher.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698